Hi Walter,
It seems that a lot of platforms does have this header file and structure:
Solaris: http://docs.oracle.com/cd/E23823_01/html/816-5167/uname-2.html#REFMAN2uname-2
AIX: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf2/uname.htm
NetWere: http://www.novell.com/documentation/developer/libc/libc_vol2/data/aioskrg.html
MacOS: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/uname.3.html
HPUX: http://www.hpmigrations.com/hpe3000_resources/MPE_to_HP-UX_cross-reference/system_administration_cross-reference/cmd.html?cmdid=MS_303
FreeBSD: http://www.freebsd.org/cgi/man.cgi?query=uname&sektion=3&n=1
OpenBSD: http://nixdoc.net/man-pages/OpenBSD/uname.3.html
NetBSD: http://netbsd.gw.com/cgi-bin/man-cgi?uname+3+NetBSD-6.0.1
Linux: http://linux.die.net/man/2/uname
Instead of have hardcoded #ifdefs, I am now checking for this header using autotools, during the configure.
Here goes the new branch:
https://github.com/SpiderLabs/ModSecurity/tree/utsname_autotools
Can you guys check if it is working fine?
Thanks,
Felipe "Zimmerle" Costa
Security Researcher, SpiderLabs
Trustwave | SMART SECURITY ON DEMAND
www.trustwave.com<http://www.trustwave.com/>
On Apr 2, 2014, at 12:49 PM, Walter Hop <mo...@sp...<mailto:mo...@sp...>> wrote:
Hi Felipe,
I have a similar compiler error when building on FreeBSD. The error remains after applying the patch. For completeness:
msc_status_engine.c: In function 'msc_status_engine_machine_name':
msc_status_engine.c:137: error: storage size of 'u' isn't known
*** [mod_security2_la-msc_status_engine.lo] Error code 1
FreeBSD does have utsname.h. You can find the man page here:
http://www.freebsd.org/cgi/man.cgi?query=uname&sektion=3&n=1
If necessary, my macros are at: http://lf.ms/macros.txt
Glad to help so let us know if we should retry.
Kind regards,
WH
On 02 Apr 2014, at 15:25, Felipe Costa <FC...@tr...<mailto:FC...@tr...>> wrote:
Probably your cross compiler was not setting this macro. I have changed it to:
#if (defined(__linux__) || defined(__gnu_linux__))
…
#endif
This sound more `fail proof`. The modification is available at the branch: cross_test
https://github.com/SpiderLabs/ModSecurity/tree/cross_test
Can you check if it is working fine?
If not, can you send me the list of pre-defined macros of your compiler? Easy to get the list:
touch /tmp/somefile.c
cpp -dM /tmp/somefile.c
--
Walter Hop | wa...@li...<mailto:wa...@li...> | PGP key: https://lifeforms.nl/pgp
------------------------------------------------------------------------------
_______________________________________________
mod-security-developers mailing list
mod...@li...<mailto:mod...@li...>
https://lists.sourceforge.net/lists/listinfo/mod-security-developers
ModSecurity Services from Trustwave's SpiderLabs:
https://www.trustwave.com/spiderLabs.php
________________________________
This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.
|