Last active
August 29, 2015 14:02
-
-
Save kelvinewilliams/6767892c153193b11008 to your computer and use it in GitHub Desktop.
Patch for OpenSIPS 1.11 db_mysql module. Addresses issue where mysql.h, et al are not located in a subdirectory mysql/. Issue on Ubuntu 12.04 with headers installed via libmysqlclient-dev.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 76fc47a962438179b898fbc20c239d5627af45d8 Mon Sep 17 00:00:00 2001 | |
From: root <root> | |
Date: Sat, 31 May 2014 21:44:25 +0000 | |
Subject: [PATCH] MySQL includes fix. (Removed hard path to mysql/) | |
--- | |
modules/db_mysql/db_mysql.c | 2 +- | |
modules/db_mysql/dbase.c | 8 ++++---- | |
modules/db_mysql/my_con.c | 2 +- | |
modules/db_mysql/my_con.h | 2 +- | |
modules/db_mysql/res.c | 2 +- | |
modules/db_mysql/val.h | 2 +- | |
6 files changed, 9 insertions(+), 9 deletions(-) | |
diff --git a/modules/db_mysql/db_mysql.c b/modules/db_mysql/db_mysql.c | |
index 3c53a69..3c780e2 100644 | |
--- a/modules/db_mysql/db_mysql.c | |
+++ b/modules/db_mysql/db_mysql.c | |
@@ -35,7 +35,7 @@ | |
#include "dbase.h" | |
#include "db_mysql.h" | |
-#include <mysql/mysql.h> | |
+#include <mysql.h> | |
unsigned int db_mysql_ping_interval = 5 * 60; /* Default is 5 minutes */ | |
unsigned int db_mysql_timeout_interval = 2; /* Default is 6 seconds */ | |
diff --git a/modules/db_mysql/dbase.c b/modules/db_mysql/dbase.c | |
index 4f5f2b4..e239943 100644 | |
--- a/modules/db_mysql/dbase.c | |
+++ b/modules/db_mysql/dbase.c | |
@@ -34,10 +34,10 @@ | |
#include <stdio.h> | |
#include <string.h> | |
-#include <mysql/mysql.h> | |
-#include <mysql/errmsg.h> | |
-#include <mysql/mysqld_error.h> | |
-#include <mysql/mysql_version.h> | |
+#include <mysql.h> | |
+#include <errmsg.h> | |
+#include <mysqld_error.h> | |
+#include <mysql_version.h> | |
#include "../../mem/mem.h" | |
#include "../../dprint.h" | |
#include "../../db/db_query.h" | |
diff --git a/modules/db_mysql/my_con.c b/modules/db_mysql/my_con.c | |
index 8030799..c6dad99 100644 | |
--- a/modules/db_mysql/my_con.c | |
+++ b/modules/db_mysql/my_con.c | |
@@ -24,7 +24,7 @@ | |
#include "my_con.h" | |
#include "db_mysql.h" | |
#include "dbase.h" | |
-#include <mysql/mysql_version.h> | |
+#include <mysql_version.h> | |
#include "../../mem/mem.h" | |
#include "../../dprint.h" | |
#include "../../ut.h" | |
diff --git a/modules/db_mysql/my_con.h b/modules/db_mysql/my_con.h | |
index 0268f64..9c289de 100644 | |
--- a/modules/db_mysql/my_con.h | |
+++ b/modules/db_mysql/my_con.h | |
@@ -28,7 +28,7 @@ | |
#include "../../db/db_id.h" | |
#include <time.h> | |
-#include <mysql/mysql.h> | |
+#include <mysql.h> | |
#define PREP_STMT_VAL_LEN 1024 | |
diff --git a/modules/db_mysql/res.c b/modules/db_mysql/res.c | |
index 09a570b..6ae8420 100644 | |
--- a/modules/db_mysql/res.c | |
+++ b/modules/db_mysql/res.c | |
@@ -25,7 +25,7 @@ | |
#include <string.h> | |
-#include <mysql/mysql.h> | |
+#include <mysql.h> | |
#include "../../db/db_res.h" | |
#include "../../mem/mem.h" | |
#include "../../dprint.h" | |
diff --git a/modules/db_mysql/val.h b/modules/db_mysql/val.h | |
index d75d1ad..4b4d8e8 100644 | |
--- a/modules/db_mysql/val.h | |
+++ b/modules/db_mysql/val.h | |
@@ -24,7 +24,7 @@ | |
#ifndef VAL_H | |
#define VAL_H | |
-#include <mysql/mysql.h> | |
+#include <mysql.h> | |
#include "../../db/db_val.h" | |
#include "../../db/db.h" | |
-- | |
1.7.9.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment