View Issue Details

IDProjectCategoryView StatusLast Update
0003977unrealinstallingpublic2011-03-25 07:50
ReporterCuleXAssigned Toohnobinki 
PrioritylowSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformi686OSOpenBSDOS Version4.8
Product Version3.2.9-RC1 
Target VersionFixed in Version3.2.9-RC2 
Summary0003977: 3.2.9-rc1: Compile error (intptr_t undeclared) on OpenBSD-4.8
DescriptionI configured UnrealIRCd with spoof-protection, IPv6, SSL and ziplinks (config.log in attached file) and get an error in s_user.c:
gcc -I../include -I/home/ircd/Unreal3.2/extras/regexp/include -I/home/ircd/Unreal3.2/extras/c-ares/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic -c s_user.c
s_user.c: In function 'check_for_target_limit':
s_user.c:463: error: 'intptr_t' undeclared (first use in this function)
s_user.c:463: error: (Each undeclared identifier is reported only once
s_user.c:463: error: for each function it appears in.)
s_user.c:463: error: expected ')' before 'target'
*** Error code 1

Interestingly enough, include/setup.h defined that intptr_t was around.
Steps To Reproduce- ./Config (The defaults lead to this result as well)
- make
- Wait for the build to fail on s_user.c
TagsNo tags attached.
3rd party modules

Relationships

has duplicate 0004016 closedohnobinki found a bug when using make command 

Activities

CuleX

2010-12-19 06:04

reporter  

config.log_plus_make.log (96,723 bytes)

syzop

2010-12-19 13:26

administrator   ~0016475

I'll leave this one to binki.

According to binki's code for win32, a quick workaround would be changing that line from:
        u_int tmp = ((u_int)(intptr_t)target & 0xffff00) >> 8;
to:
        u_int tmp = ((u_int)(long)target & 0xffff00) >> 8;
..then you can at least continue in the meantime ;)

(did not test or verify)

ohnobinki

2010-12-20 06:10

reporter   ~0016480

culex: does placing

#include <stdint.h>

into s_user.c fix the problem? It seems that stdint.h is the header which would have intptr_t and unrealircd doesn't #include that anywhere yet... so we GNU users must be getting this header included by accident.

I'll attach a patch which I think does the most sensible thing with trying to globally include stdint.h, with a fallback to inttypes.h.

ohnobinki

2010-12-20 06:12

reporter  

unreal-3977-stdint_h.patch (2,474 bytes)

CuleX

2010-12-21 05:37

reporter   ~0016483

ohnobinki: Indeed it does. That simple fix got rid of the problem. The build fails at another point later on, I guess I'll make another bug report about it.

ohnobinki

2010-12-21 05:56

reporter   ~0016484

The attached patch is now in CVS and will show up in 3.2.9-rc2:

- Fix missing #include <stdint.h>. Fixes compile error on OpenBSD
  reported by CuleX (0003977).

Thanks for the report, and I look forward to your next error ;-).

Issue History

Date Modified Username Field Change
2010-12-19 06:04 CuleX New Issue
2010-12-19 06:04 CuleX File Added: config.log_plus_make.log
2010-12-19 13:26 syzop Note Added: 0016475
2010-12-20 06:10 ohnobinki Note Added: 0016480
2010-12-20 06:12 ohnobinki File Added: unreal-3977-stdint_h.patch
2010-12-20 06:14 ohnobinki Assigned To => ohnobinki
2010-12-20 06:14 ohnobinki Status new => assigned
2010-12-21 05:37 CuleX Note Added: 0016483
2010-12-21 05:56 ohnobinki Note Added: 0016484
2010-12-21 05:56 ohnobinki Status assigned => resolved
2010-12-21 05:56 ohnobinki Fixed in Version => 3.2.9-RC1
2010-12-21 05:56 ohnobinki Resolution open => fixed
2010-12-21 06:00 ohnobinki Product Version => 3.2.9-RC1
2010-12-21 14:28 ohnobinki Fixed in Version 3.2.9-RC1 => 3.2.9-RC2
2011-03-25 07:50 ohnobinki Relationship added has duplicate 0004016
2011-03-25 07:50 ohnobinki Summary 3.2.9-rc1: Compile error properly on OpenBSD => 3.2.9-rc1: Compile error (intptr_t undeclared) on OpenBSD-4.8