summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-21 17:56:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-21 17:56:07 +0000
commit221934729eba613b1a845771a0a6aabf3eb6390c (patch)
treefb3ee8049a157ef35d9bcb54103e81e4f7c27f2b /src
parent2010b514a638f43d515e9539ef21015f733ec279 (diff)
Change includes, use --libs_r rather than mysql_config --libs, we want re-enterant libs for pthreads
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4477 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_mysql.cpp9
-rw-r--r--src/mysql_rpath.pl2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 654d84191..aef6abca9 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -19,15 +19,18 @@ using namespace std;
#include <stdio.h>
#include <string>
#include <mysql.h>
+#include <pthread.h>
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
-#include "m_sql.h"
+#include "m_sqlv2.h"
+
+/* VERSION 2 API: With nonblocking (threaded) requests */
/* $ModDesc: SQL Service Provider module for all other m_sql* modules */
-/* $CompileFlags: `mysql_config --include` */
-/* $LinkerFlags: `mysql_config --libs` `perl ../mysql_rpath.pl` */
+/* $CompileFlags: -pthread `mysql_config --include` */
+/* $LinkerFlags: -pthread `mysql_config --libs_r` `perl ../mysql_rpath.pl` */
/** SQLConnection represents one mysql session.
* Each session has its own persistent connection to the database.
diff --git a/src/mysql_rpath.pl b/src/mysql_rpath.pl
index 33da4f353..befa45a82 100644
--- a/src/mysql_rpath.pl
+++ b/src/mysql_rpath.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-$data = `mysql_config --libs`;
+$data = `mysql_config --libs_r`;
$data =~ /-L(\S+)\s/;
$libpath = $1;
print "-Wl,--rpath -Wl,$libpath";