Bug 61894 - Redefinition of uint8_t et cetera
Redefinition of uint8_t et cetera
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-25 13:47 EST by Bill McCarty
Modified: 2016-11-24 10:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-25 14:36:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill McCarty 2002-03-25 13:47:41 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461)

Description of problem:
Both /usr/include/sys/types.h and /usr/include/stdint.h unconditionally define 
uint8_t and uint16_t. The former also unconditionally defines uint32_t. This 
causes type redefinition errors when compiling code that uses both include 
files. This affects, for instance, Snort 1.8.4. 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Download and attempt to compile snort-1.8.4, available at www.snort.org.
	

Actual Results:  
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/pcap  -I/usr/include  -g -O2 -
Wall -DDEBUG -ggdb -DENABLE_RESPONSE -D_BSD_SOURCE -D__BSD_SOURCE -
D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -c snort.c
In file included from /usr/include/netinet/in.h:23,
                 from snort.h:43,
                 from snort.c:45:
/usr/include/stdint.h:49: redefinition of `uint8_t'
/usr/include/sys/types.h:196: `uint8_t' previously declared here
/usr/include/stdint.h:50: redefinition of `uint16_t'
/usr/include/sys/types.h:197: `uint16_t' previously declared here
/usr/include/stdint.h:52: redefinition of `uint32_t'
/usr/include/sys/types.h:198: `uint32_t' previously declared here
make[2]: *** [snort.o] Error 1
make[2]: Leaving directory `/root/snort-1.8.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/snort-1.8.4'
make: *** [all-recursive-am] Error 2


Expected Results:  Clean compile.

Additional info:

These include files are included in glibc-devel-2.2.4-19.3, but I don't find 
the glibc-devel component listed. So, I filed under glibc.
Comment 1 Jakub Jelinek 2002-03-25 14:36:48 EST
No, <stdint.h> unconditionally defines uint8_t, uint16_t etc., while
<sys/types.h> unconditionally defines u_int8_t, u_int16_t etc.
The only way how this could happen is if snort defined u_int8_t to uint8_t
before including the headers.
Comment 2 Bill McCarty 2002-03-25 15:05:47 EST
Yes, you're exactly right. Thanks for the keen eyes and mind and the timely 
reply. I'll report this issue to the developers.

Note You need to log in before you can comment on or make changes to this bug.