After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608121 - Build fail cause ifaddrs.h not available
Build fail cause ifaddrs.h not available
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: general
git master
Other Solaris
: Normal major
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2010-01-26 03:06 UTC by Halton Huo
Modified: 2010-01-27 12:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user self ifaddrs.h if system do not have (9.78 KB, patch)
2010-01-26 04:05 UTC, Halton Huo
committed Details | Review

Description Halton Huo 2010-01-26 03:06:38 UTC
I'm building vinagre master and 2.29.6 code, both get following error:

$ make
[...]
"vinagre-vnc-listener-dialog.c", line 24: cannot find include file: <ifaddrs.h>
"../../vinagre/vinagre-utils.h", line 33: warning: enumerator value overflows INT_MAX (2147483647)
"vinagre-vnc-listener-dialog.c", line 58: warning: implicit function declaration: getifaddrs
"vinagre-vnc-listener-dialog.c", line 59: improper member use: ifa_next
"vinagre-vnc-listener-dialog.c", line 59: warning: assignment type mismatch:
        pointer to struct ifaddrs {} "=" pointer to struct ifaddr {struct sockaddr {..} ifa_addr, union  {..} ifa_ifu, pointer to struct ifnet {..} ifa_ifp, pointer to struct ifaddr {..} ifa_next}
"vinagre-vnc-listener-dialog.c", line 61: improper member use: ifa_addr
"vinagre-vnc-listener-dialog.c", line 61: operands have incompatible types:
         struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "==" int
"vinagre-vnc-listener-dialog.c", line 61: undefined struct/union member: ifa_name
"vinagre-vnc-listener-dialog.c", line 61: undefined struct/union member: ifa_flags
"vinagre-vnc-listener-dialog.c", line 61: improper member use: ifa_name
"vinagre-vnc-listener-dialog.c", line 61: warning: improper pointer/integer combination: arg #1
"vinagre-vnc-listener-dialog.c", line 64: improper member use: ifa_addr
"vinagre-vnc-listener-dialog.c", line 64: left operand of "->" must be pointer to struct/union
"vinagre-vnc-listener-dialog.c", line 67: improper member use: ifa_addr
"vinagre-vnc-listener-dialog.c", line 67: invalid cast expression
"vinagre-vnc-listener-dialog.c", line 74: improper member use: ifa_addr
"vinagre-vnc-listener-dialog.c", line 74: invalid cast expression
"vinagre-vnc-listener-dialog.c", line 110: warning: implicit function declaration: freeifaddrs
cc: acomp failed for vinagre-vnc-listener-dialog.c

Solaris do have a bug to get ifaddrs.h but not now. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6731945

vinagre code should be built if system does not have ifaddrs.h, I'd like to offer a patch later.
Comment 1 Halton Huo 2010-01-26 04:05:55 UTC
Created attachment 152284 [details] [review]
user self ifaddrs.h if system do not have
Comment 2 Jonh Wendell 2010-01-26 11:52:47 UTC
Review of attachment 152284 [details] [review]:

Hello, Halton.

Just fix the check in configure.ac:
AM_CONDITIONAL(SELF_IFADDRS, test "x$ac_cv_header_ifaddrs_h" != "xyes")

And can commit. Thanks!
Comment 3 Halton Huo 2010-01-27 02:12:52 UTC
Committed in master 9674b327857d07aaf7b7d0595daba84ef4e9c57c
Comment 4 Jonh Wendell 2010-01-27 11:53:28 UTC
Hey, Halton, you didn't fix the check I told you... I just fixed that ;)
http://git.gnome.org/browse/vinagre/commit/?id=5e4269b551ae50dd7d2ac598fe57c73ab61571da
Comment 5 Halton Huo 2010-01-27 12:03:44 UTC
(In reply to comment #4)
> Hey, Halton, you didn't fix the check I told you... I just fixed that ;)
> http://git.gnome.org/browse/vinagre/commit/?id=5e4269b551ae50dd7d2ac598fe57c73ab61571da
Sorry, I did not notice the first "x" added. Thanks for the fixing.