From 2768a55b02e1b58bf94740575a870fd43b8c810c Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Wed, 5 Nov 2003 05:42:23 +0000
Subject: [PATCH] Voicemail/mysql updates

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/Makefile         | 4 ++++
 apps/app_voicemail2.c | 7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/apps/Makefile b/apps/Makefile
index 27d4494a0f..c2c18df166 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -42,6 +42,10 @@ ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
 CFLAGS+=-DUSEPOSTGRESVM
 endif
 
+ifeq ($(USE_MYSQL_VM_INTERFACE),1)
+CFLAGS+=-DUSEMYSQLVM
+endif
+
 all: $(APPS)
 
 clean:
diff --git a/apps/app_voicemail2.c b/apps/app_voicemail2.c
index 1a14708bf9..990fcbb3ce 100755
--- a/apps/app_voicemail2.c
+++ b/apps/app_voicemail2.c
@@ -38,8 +38,7 @@
 
 /* we define USESQLVM when we have MySQL or POSTGRES */
 #ifdef USEMYSQLVM
-#include <mysql.h>
-#include "mysql-vm-routines.h"
+#include <mysql/mysql.h>
 #define USESQLVM 1
 #endif
 
@@ -199,6 +198,10 @@ static void apply_options(struct ast_vm_user *vmu, char *options)
 	
 }
 
+#ifdef USEMYSQLVM
+#include "mysql-vm-routines.h"
+#endif
+
 #ifdef USEPOSTGRESVM
 
 PGconn *dbhandler;
-- 
GitLab