#174 OpenBSD build issue

closed-fixed
nobody
5
2012-06-22
2012-06-22
woland_
No

Hi
To build on OpenBSD the following patch is required:

--- src/purple/purple-dnsquery.c.orig Wed Mar 21 13:16:46 2012
+++ src/purple/purple-dnsquery.c Thu Apr 19 10:03:54 2012
@@ -24,9 +24,14 @@
#include "win32/win32dep.h" /* for inet_ntop() */
#include <ws2tcpip.h>
#else
-#include <arpa/inet.h>
-#include <netinet/in.h>
+#include <sys/types.h>
#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/tcp.h>
+#include <netinet/ip.h>
+#include <arpa/inet.h>
#endif

#include <glib.h>

Could this please be committed and I'll remove from the port?
Thanks

Discussion

  • Stefan Becker

    Stefan Becker - 2012-06-22

    The reordering looks OK, but I don't understand the need for additional headers. I would understand

    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>

    because that would then be the same as is in purple-network.c. Why are headers for IP & TCP required when the code doesn't process IP or TCP packets? If they would be required, why does purple-network.c compile on OpenBSD?

     
  • woland_

    woland_ - 2012-06-22

    Agreed. Sorry here's a new patch

    --- src/purple/purple-dnsquery.c.orig Fri Jun 22 09:09:47 2012
    +++ src/purple/purple-dnsquery.c Fri Jun 22 09:09:56 2012
    @@ -25,9 +25,10 @@
    #include "win32/win32dep.h"
    #include <ws2tcpip.h>
    #else
    -#include <arpa/inet.h>
    -#include <netinet/in.h>
    +#include <sys/types.h>
    #include <sys/socket.h>
    +#include <netinet/in.h>
    +#include <arpa/inet.h>
    #endif

    Cheers

     
  • Stefan Becker

    Stefan Becker - 2012-06-22
    • status: open --> closed-fixed
     
  • Stefan Becker

    Stefan Becker - 2012-06-22

    Patch applied in commit 3725156

     

Log in to post a comment.