Преглед изворни кода

xmlrpc: redeclaration of v/snprintf() conditioned by OS type

Daniel-Constantin Mierla пре 14 година
родитељ
комит
b03a9c1bc7
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      modules/xmlrpc/xmlrpc.c

+ 7 - 0
modules/xmlrpc/xmlrpc.c

@@ -147,6 +147,13 @@
 
 MODULE_VERSION
 
+#if defined (__OS_darwin) || defined (__OS_freebsd)
+/* redeclaration of functions from stdio.h throws errors */
+#else
+int snprintf(char *str, size_t size, const char *format, ...);
+int vsnprintf(char *str, size_t size, const char *format, va_list ap);
+#endif
+
 static int process_xmlrpc(sip_msg_t* msg);
 static int dispatch_rpc(sip_msg_t* msg, char* s1, char* s2);
 static int xmlrpc_reply(sip_msg_t* msg, char* code, char* reason);