[JDEV] Undefined symbols on Linux in libjabber
Kevin Smathers
ks at micky.hpl.hp.com
Mon Nov 19 14:33:19 CST 2001
CVS top of trunk doesn't compile on Linux due to a missing include.
To get 'struct tm' on Linux you must include <time.h> in addition to
<sys/time.h>. Including <sys/time.h> only defines time_t so as not
to pollute the namespace with additional defines.
A patch is included below although it needs to be reworked to handle
operating systems without a <time.h> header. (Are there any?)
--
// .--=,
.....::://::::::::::::::::::::::::::::.. (o O & kevin_smathers at hp.com
:::::::://:::://://://:/:://::||_// / V K
:::::://:::://:/:|//'/' // _,|' r , 'qk
:'''/____ // / // |_// // || .'~. .~`,
kls \_/-=\_/
-------------- next part --------------
? patch
Index: include/jabber/jabber.h
===================================================================
RCS file: /home/cvs/libjabber/include/jabber/jabber.h,v
retrieving revision 1.85
diff -u -r1.85 jabber.h
--- include/jabber/jabber.h 2000/11/03 04:49:18 1.85
+++ include/jabber/jabber.h 2001/11/19 20:52:00
@@ -35,6 +35,7 @@
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/time.h>
+#include <time.h>
#include <ctype.h>
#include "libxode.h"
More information about the JDev
mailing list