Bug 23377 - farsight2-0.0.14: compilation error on NetBSD
Summary: farsight2-0.0.14: compilation error on NetBSD
Status: RESOLVED FIXED
Alias: None
Product: Farstream
Classification: Unclassified
Component: Raw UDP transmitter (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) NetBSD
: medium normal
Assignee: Olivier Crête
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-17 13:44 UTC by Thomas Klausner
Modified: 2013-06-25 14:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing the first problem. (340 bytes, patch)
2009-08-17 13:44 UTC, Thomas Klausner
Details | Splinter Review
Patch fixing the second problem. (378 bytes, patch)
2009-08-17 13:44 UTC, Thomas Klausner
Details | Splinter Review
Patch fixing compilation problem in farstream-0.2.3 on NetBSD-6.99.20/amd64. (783 bytes, patch)
2013-06-25 09:49 UTC, Thomas Klausner
Details | Splinter Review

Description Thomas Klausner 2009-08-17 13:44:34 UTC
Created attachment 28713 [details] [review]
Patch fixing the first problem.

farsight2-0.0.14 doesn't compile on NetBSD-5.99.15/amd64. It fails with:
Making all in rawudp
  CC    fs-rawudp-transmitter.o
  CC    fs-rawudp-component.o
  CC    fs-rawudp-marshal.o
In file included from fs-rawudp-transmitter.c:56:
/usr/include/netinet/ip.h:149: error: expected specifier-qualifier-list before 'n_time'

Looks like a missing header file, but I'm not sure which one.
/usr/include/netinet/in_systm.h has a line:
typedef u_int32_t n_time;               /* ms since 00:00 GMT, byte rev */
But I'm not sure if that is intended to be included directly.
If I include it, however, compilation proceeds until it fails later with:
Making all in multicast
  CC    fs-multicast-stream-transmitter.o
  CC    fs-multicast-transmitter.o
In file included from fs-multicast-transmitter.c:56:
/usr/include/netinet/ip.h:67: error: field 'ip_src' has incomplete type
/usr/include/netinet/ip.h:67: error: field 'ip_dst' has incomplete type
/usr/include/netinet/ip.h:149: error: expected specifier-qualifier-list before 'n_time'
/usr/include/netinet/ip.h:187: error: field 'ippseudo_src' has incomplete type
/usr/include/netinet/ip.h:188: error: field 'ippseudo_dst' has incomplete type

Here I need to include both netinet/in.h and netinet/in_systm.h to compile.
Comment 1 Thomas Klausner 2009-08-17 13:44:55 UTC
Created attachment 28714 [details] [review]
Patch fixing the second problem.
Comment 2 Olivier Crête 2009-08-17 15:10:11 UTC
netinet/in_systm.h is not standard (ie it doesn't exist in glibc). But that said, netinet/ip.h is not POSIX either.  I guess the whole thing needs configure tests to know what to include...
Comment 3 Olivier Crête 2013-06-24 20:21:30 UTC
Can you try the latest farstream 0.2.3 release and tell me if anything fails there? We use the GLib abstractions a lot more now.
Comment 4 Thomas Klausner 2013-06-25 09:48:46 UTC
I've tried compiling farstream 0.2.3 on NetBSD-6.99.20/amd64.

I have one issue:
In file included from fs-multicast-transmitter.c:57:0:
/usr/include/netinet/ip.h:68:19: error: field 'ip_src' has incomplete type
/usr/include/netinet/ip.h:68:27: error: field 'ip_dst' has incomplete type
/usr/include/netinet/ip.h:204:19: error: field 'ipt_addr' has incomplete type
/usr/include/netinet/ip.h:240:17: error: field 'ippseudo_src' has incomplete type
/usr/include/netinet/ip.h:241:17: error: field 'ippseudo_dst' has incomplete type

If I just remove that header include, it compiles fine on NetBSD. I'll attach a patch.
Comment 5 Thomas Klausner 2013-06-25 09:49:42 UTC
Created attachment 81402 [details] [review]
Patch fixing compilation problem in farstream-0.2.3 on NetBSD-6.99.20/amd64.
Comment 6 Olivier Crête 2013-06-25 14:38:44 UTC
Thanks, fixed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.