Hello all,

Glibc 2.2.2 sanitizes /usr/include/*/*.h files quite a bit to get more
conformat with an upcoming standard. Glibc 2.2.2 is in use in e.g. latest
Red Hat Linux beta.

The compilation of tcpslice fails because of this.  Some kind of a patch
is attached; however, on some platforms, it might not be legal to include
both sys/time.h and time.h.

----
# make
gcc -O2 -O2 -march=i386 -mcpu=i686 -DHAVE_FCNTL_H=1 -DTIME_WITH_SYS_TIME=1
-DHAVE_FTELLO=1 -DHAVE_FSEEKO=1 -DUSE_FTELLO=1 -DUSE_FSEEKO=1
-DHAVE_VFPRINTF=1  -I. -I../libpcap-0.6.2  -c ./tcpslice.c
In file included from ./tcpslice.c:56:
tcpslice.h:23: warning: `struct tm' declared inside parameter list
tcpslice.h:23: warning: its scope is only this definition or declaration,
which is probably not what you want.
./tcpslice.c:75: warning: `struct tm' declared inside parameter list
./tcpslice.c: In function `parse_time':
./tcpslice.c:229: warning: initialization makes pointer from integer
without a cast
./tcpslice.c:230: storage size of `t' isn't known
./tcpslice.c:274: dereferencing pointer to incomplete type
./tcpslice.c:300: dereferencing pointer to incomplete type
./tcpslice.c:301: dereferencing pointer to incomplete type
./tcpslice.c:302: dereferencing pointer to incomplete type
./tcpslice.c:303: dereferencing pointer to incomplete type
./tcpslice.c:304: dereferencing pointer to incomplete type
./tcpslice.c:305: dereferencing pointer to incomplete type
./tcpslice.c: At top level:
./tcpslice.c:336: warning: `struct tm' declared inside parameter list
./tcpslice.c:337: conflicting types for `fill_tm'
./tcpslice.c:75: previous declaration of `fill_tm'
./tcpslice.c: In function `fill_tm':
./tcpslice.c:373: dereferencing pointer to incomplete type
./tcpslice.c:373: dereferencing pointer to incomplete type
./tcpslice.c:380: dereferencing pointer to incomplete type
./tcpslice.c:380: dereferencing pointer to incomplete type
./tcpslice.c:382: dereferencing pointer to incomplete type
./tcpslice.c:382: dereferencing pointer to incomplete type
./tcpslice.c:386: dereferencing pointer to incomplete type
./tcpslice.c:386: dereferencing pointer to incomplete type
./tcpslice.c:390: dereferencing pointer to incomplete type
./tcpslice.c:390: dereferencing pointer to incomplete type
./tcpslice.c:394: dereferencing pointer to incomplete type
./tcpslice.c:394: dereferencing pointer to incomplete type
./tcpslice.c: In function `timestamp_to_string':
./tcpslice.c:585: warning: assignment makes pointer from integer without a
cast
./tcpslice.c:586: warning: passing arg 1 of `strlen' makes pointer from
integer without a cast
./tcpslice.c:586: warning: passing arg 1 of `strlen' makes pointer from
integer without a cast
./tcpslice.c:586: warning: passing arg 1 of `strlen' makes pointer from
integer without a cast
./tcpslice.c:586: warning: passing arg 2 of `memcpy' makes pointer from
integer without a cast
./tcpslice.c:586: warning: passing arg 2 of `strcpy' makes pointer from
integer without a cast
./tcpslice.c:591: warning: assignment makes pointer from integer without a
cast
./tcpslice.c:593: dereferencing pointer to incomplete type
./tcpslice.c:593: dereferencing pointer to incomplete type
./tcpslice.c:593: dereferencing pointer to incomplete type
./tcpslice.c:593: dereferencing pointer to incomplete type
./tcpslice.c:594: dereferencing pointer to incomplete type
./tcpslice.c:594: dereferencing pointer to incomplete type
make: *** [tcpslice.o] Error 1
---

-- 
Pekka Savola                  "Tell me of difficulties surmounted,
Netcore Oy                    not those you stumble over and fall"
Systems. Networks. Security.   -- Robert Jordan: A Crown of Swords
diff -uNr tcpslice/tcpslice.c tcpslice.new/tcpslice.c
--- tcpslice/tcpslice.c Tue Nov 14 21:10:22 2000
+++ tcpslice.new/tcpslice.c     Thu Mar  1 15:17:59 2001
@@ -47,6 +47,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <time.h>
 
 #include "gnuc.h"
 #ifdef HAVE_OS_PROTO_H
diff -uNr tcpslice/util.c tcpslice.new/util.c
--- tcpslice/util.c     Sun Jun 11 20:21:45 2000
+++ tcpslice.new/util.c Thu Mar  1 15:18:35 2001
@@ -34,6 +34,7 @@
 #endif
 #include <pcap.h>
 #include <string.h>
+#include <time.h>
 
 #include "gnuc.h"
 #ifdef HAVE_OS_PROTO_H

Reply via email to