bugGPSD - Bugs: bug #53261, scons sockaddr error on FreeBSD

 
 

bug #53261: scons sockaddr error on FreeBSD

Submitted by:  None
Submitted on:  Fri 02 Mar 2018 04:14:18 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 May 2019 12:47:13 PM UTC, comment #3:

It looks like the include that defines sockaddr requires inclusion of some other .h file in order to define IP types. Search for those definitions and add the include before the sockaddr include, and see if that helps. You might then see if any standards speak to needing the additional include, and if they can just be added unconditionally.

FWIW, gpsd 3.18.1 builds on NetBSD 8, but I realize there is divergence on the extent to which system headers automatically include other headers.

See POSIX:
- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html

Greg Troxel <gdt>
Project Member
Wed 26 Dec 2018 04:53:25 PM UTC, comment #2:

Your compile isn't seeing a network-API header that ut needs. Would you please reply attaching your gpsd_config.h?

Eric S. Raymond <esr>
Project Administrator
Fri 02 Mar 2018 04:18:35 AM UTC, comment #1:

Apologies for the anonymous submission. This is roycewilliams/royce@tycho.org.

Royce Williams <roycewilliams>
Fri 02 Mar 2018 04:14:18 AM UTC, original submission:

$ uname -imrs
FreeBSD 10.3-RELEASE-p24 amd64 GENERIC

$ git describe --tags
release-3.17-56-g89251b80

$ scons timeservice=yes magic_hat=yes nmea0183=yes fixed_port_speed=9600 fixed_stop_bits=1

[...]

gcc -o netlib.o -c -pthread -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 -pthread -DHAVE_SYS_TIMEPPS_H=1 netlib.c
In file included from netlib.c:40:0:
sockaddr.h:5:24: error: field 'sa_in' has incomplete type
struct sockaddr_in sa_in;
^~~~~
sockaddr.h:7:25: error: field 'sa_in6' has incomplete type
struct sockaddr_in6 sa_in6;
^~~~~~
netlib.c: In function 'netlib_connectsock':
netlib.c:65:33: error: 'IPPROTO_UDP' undeclared (first use in this function)
proto = (ppe) ? ppe->p_proto : IPPROTO_UDP;
^~~~~~~~~~~
netlib.c:65:33: note: each undeclared identifier is reported only once for each function it appears in
netlib.c:68:33: error: 'IPPROTO_TCP' undeclared (first use in this function)
proto = (ppe) ? ppe->p_proto : IPPROTO_TCP;
^~~~~~~~~~~
scons: *** [netlib.o] Error 1
scons: building terminated because of errors.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gdt (Posted a comment)
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by roycewilliams (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.4