Nmap Development mailing list archives

fix to build nmap on some OpenBSD archs


From: Sebastian Reitenbach <sebastia () l00-bugdead-prods de>
Date: Thu, 8 Jul 2010 12:58:57 +0200

Hi,

OpenBSD sparc and some others have gcc-2.95 as default compiler. Appended 
patch against nmap 5.21 fixes compilation, so that I can actually use it on my 
sparc. 


the patch regarding nsock/src/nsock_pcap.c was already in the OpenBSD ports 
tree, only parts of it are responsible to fix the build with gcc2. The part 
where I am not responsible and not sure what it fixes is the following:

@@ -325,11 +323,14 @@ int do_actual_pcap_read(msevent *nse)
 void nse_readpcap(nsock_event nsee,
        const unsigned char **l2_data, size_t *l2_len,
        const unsigned char **l3_data, size_t *l3_len,
-       size_t *packet_len, struct timeval *ts)
+       size_t *packet_len, struct bpf_timeval *ts)
 {
        msevent *nse = (msevent *)nsee;

I guess the timeval is not existing.

Sebastian

Attachment: patch-nmap.diff
Description:

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: