[MacPorts] #38822: nmap fails to compile, missing "#include <sys/types.h>"
MacPorts
noreply at macports.org
Wed Oct 29 20:59:25 PDT 2014
#38822: nmap fails to compile, missing "#include <sys/types.h>"
-------------------------+----------------------
Reporter: aseering@… | Owner: dluke@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Resolution: | Keywords:
Port: nmap |
-------------------------+----------------------
Comment (by geoffdown@…):
Replying to [comment:1 dluke@…]:
> I don't have a 10.4 system to test on, but one thing you might want to
do is report this upstream.
>
> If you do, please note it here (including whatever fix that ends up
being merged upstream). If you can attach a patchfile with your change and
a portfile diff (which applies the patch only on 10.4), I'm likely to get
to updating the port sooner than if I have to generate it myself (and try
to test it somehow).
I just came across this same bug. Type off_t is apparently not native to
apple_gcc 4.2, but the code assumes it is. Changing
{{{
89 #if defined(LUA_USE_POSIX) /* { */
90
91 #define l_fseek(f,o,w) fseeko(f,o,w)
92 #define l_ftell(f) ftello(f)
93 #define l_seeknum off_t
}}}
in liolib.c to
{{{
89 #if defined(LUA_USE_POSIX) /* { */
90
91 #define l_fseek(f,o,w) fseeko(f,o,w)
92 #define l_ftell(f) ftello(f)
93 #define l_seeknum __darwin_off_t
}}}
works - that's the definition in /usr/include/sys/types.h - but that's not
elegant nor 10.4 specific. I suppose you should check whether 'off_t' is
declared at the top of the file (how? does ifndef work for types?) and if
not, include sys/types.h . Where is this 'upstream' I should be reporting
this to? I doubt I'll be able to write a Portfile, but I'm open to
testing.
--
Ticket URL: <https://trac.macports.org/ticket/38822#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list