fixed WIN32 support
[NeonServV5.git] / src / mysqlConn.c
index 12ab76d6ff709ab7bf986e08384a62beaaef80bd..3e5dd19dfac03a156ede2bb49a30bfb26f83b5a7 100644 (file)
@@ -19,7 +19,7 @@
 #define DATABASE_VERSION "15"
 
 struct mysql_conn_struct {
-    unsigned long tid;
+    unsigned int tid;
     MYSQL *mysql_conn;
     struct used_result *used_results;
     struct escaped_string *escaped_strings;
@@ -264,9 +264,9 @@ char* escape_string(const char *str) {
 struct mysql_conn_struct *get_mysql_conn_struct() {
     SYNCHRONIZE(synchronized);
     struct mysql_conn_struct *mysql_conn;
-    unsigned long tid;
+    unsigned int tid;
     #ifdef HAVE_THREADS
-    tid = syscall(SYS_gettid);
+    tid = (unsigned int) pthread_self_tid();
     #else
     tid = 1;
     #endif