Advertisement
mmu_man

libmpdclient Haiku patch 0.3

Jul 12th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From ebc3aee7d7bf55bdbd20a82e104720de2ef98532 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
  3. Date: Fri, 11 Jul 2014 08:55:59 +0200
  4. Subject: [PATCH 1/2] Add libnetwork to the tested libs for socket()
  5.  
  6. Haiku requires this.
  7. ---
  8. configure.ac | 2 +-
  9.  1 file changed, 1 insertion(+), 1 deletion(-)
  10.  
  11. diff --git a/configure.ac b/configure.ac
  12. index 3a9885e..e26c137 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -52,7 +52,7 @@ dnl
  16.  dnl Check for libraries
  17.  dnl
  18.  
  19. -AC_SEARCH_LIBS([socket], [socket])
  20. +AC_SEARCH_LIBS([socket], [network socket])
  21.  AC_SEARCH_LIBS([gethostbyname], [nsl])
  22.  
  23.  
  24. --
  25. 1.8.3.4
  26.  
  27. From 3f9d42afbba34af70ef2208fc6f0c1b3f47b5fde Mon Sep 17 00:00:00 2001
  28. From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
  29. Date: Fri, 11 Jul 2014 08:56:49 +0200
  30. Subject: [PATCH 2/2] POSIX says fd_set is defined by <sys/select.h>
  31.  
  32. Haiku requires this.
  33.  
  34. cf.
  35. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/select.h.html
  36.  
  37. Also guard sys/select.h by ifndef WIN32 as Mingw32 doesn't provide it.
  38. We'll avoid a configure check just for this.
  39. ---
  40. src/socket.c | 1 +
  41.  src/sync.c   | 3 +++
  42.  2 files changed, 4 insertions(+)
  43.  
  44. diff --git a/src/socket.c b/src/socket.c
  45. index f76510c..2aa5f7f 100644
  46. --- a/src/socket.c
  47. +++ b/src/socket.c
  48. @@ -43,6 +43,7 @@
  49.  #else
  50.  #  include <netinet/in.h>
  51.  #  include <arpa/inet.h>
  52. +#  include <sys/select.h>
  53.  #  include <sys/socket.h>
  54.  #  include <netdb.h>
  55.  #  include <sys/un.h>
  56. diff --git a/src/sync.c b/src/sync.c
  57. index 43cfe50..0a6c9d3 100644
  58. --- a/src/sync.c
  59. +++ b/src/sync.c
  60. @@ -33,6 +33,9 @@
  61.  #include <assert.h>
  62.  #include <stdlib.h>
  63.  #include <stdio.h>
  64. +#ifndef WIN32
  65. +#include <sys/select.h>
  66. +#endif
  67.  #include <fcntl.h>
  68.  #include <unistd.h>
  69.  
  70. --
  71. 1.8.3.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement