This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I downloaded v. 1.10.5 and the build failed. I simply ran ./configure without any options. The error was:

  CC     wireshark-capture-pcap-util.o
capture-pcap-util.c:569:1: error: static declaration of ‘pcap_datalink_name_to_val’ follows non-static declaration
In file included from /usr/include/pcap.h:45:0,
                 from capture-pcap-util.h:30,
                 from capture-pcap-util.c:48:
/usr/include/pcap/pcap.h:380:5: note: previous declaration of ‘pcap_datalink_name_to_val’ was here
capture-pcap-util.c:584:1: error: static declaration of ‘pcap_datalink_val_to_name’ follows non-static declaration
In file included from /usr/include/pcap.h:45:0,
                 from capture-pcap-util.h:30,
                 from capture-pcap-util.c:48:
/usr/include/pcap/pcap.h:381:13: note: previous declaration of ‘pcap_datalink_val_to_name’ was here

Which definition should be removed or modified?

Thank you, Chuck Crisler

asked 15 Jan '14, 06:51

ChuckCrisler's gravatar image

ChuckCrisler
11223
accept rate: 0%

edited 15 Jan '14, 07:02

grahamb's gravatar image

grahamb ♦
19.8k330205


Which definition should be removed or modified?

Neither.

Instead, you need to file a Wireshark bug at the Wireshark Bugzilla, and attach the config.log file in the build directory; apparently, the configure script thought your version of libpcap doesn't have pcap_datalink_name_to_val() or pcap_datalink_val_to_name(), but it does.

permanent link

answered 15 Jan '14, 16:16

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335195
accept rate: 19%

OK, I will do that tomorrow. Thank you for the info. However, I do still need the build. How do I get it to work?

Thank you, Chuck

(15 Jan '14, 17:00) ChuckCrisler

Edit config.h and make sure it defines HAVE_PCAP_DATALINK_NAME_TO_VAL, HAVE_PCAP_DATALINK_VAL_TO_NAME, and HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION. This may, or may not, make the compile of that file succeed, and, if it does make the compile of that file succeed, there may be other problems, if the configure script made other errors.

(15 Jan '14, 17:29) Guy Harris ♦♦

I have a similar issue with build 1.10.2, but it only happens when I use --enable-static in the configure.

(02 Jul '14, 08:48) FlanOSU
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×28

question asked: 15 Jan '14, 06:51

question was seen: 1,325 times

last updated: 02 Jul '14, 08:49

p​o​w​e​r​e​d by O​S​Q​A