Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Syntaz error in nsock_pcap.c revision 31668
From: Henri Doreau <henri.doreau () gmail com>
Date: Tue, 6 Aug 2013 19:34:06 +0200

2013/8/6 Robert Snyder <rwsnyder () ncsu edu>:
Simple enough.

gcc -c -I../../nbase -DHAVE_CONFIG_H -DNSOCK_VERSION=\"0.02\"
-D_FORTIFY_SOURCE=2 -I../include -I../../libpcap -g -O2 -Wall
nsock_pcap.c -o nsock_pcap.o
nsock_pcap.c: In function ‘nsock_pcap_open’:
nsock_pcap.c:313: error: ‘i’ undeclared (first use in this function)
nsock_pcap.c:313: error: (Each undeclared identifier is reported only once
nsock_pcap.c:313: error: for each function it appears in.)
nsock_pcap.c:313: error: expected ‘;’ before ‘f’
make[1]: *** [nsock_pcap.o] Error 1
make: *** [nsock_build] Error 2

Fix line 313 in nmap/nsock/src/nsock_pcap.c, extra space between the i and
the f in the if statement:

313  i  f (mp->pcap_desc != -1) {  //change i f to if
314    int immediate = 1;
316    if (ioctl(mp->pcap_desc, BIOCIMMEDIATE, &immediate) < 0)
317      fatal("Cannot set BIOCIMMEDIATE on pcap descriptor");
318  }
319 #endif

Robert Wesley Snyder
PhD Candidate
NCSU Department of Computer Science Bioinformatics Laboratory

Thanks a lot. Fixed in r31673.

Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]