[pcsxr] 02/04: Fix FTBFS on non-linux arches

James Cowgill jcowgill-guest at moszumanska.debian.org
Fri Apr 1 22:39:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch master
in repository pcsxr.

commit 9b4ca87e5bb519bbc91aa9fa43d5e55fee596b60
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Fri Apr 1 22:44:07 2016 +0100

    Fix FTBFS on non-linux arches
---
 debian/patches/07_non-linux-ip-addr.patch | 51 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 2 files changed, 52 insertions(+)

diff --git a/debian/patches/07_non-linux-ip-addr.patch b/debian/patches/07_non-linux-ip-addr.patch
new file mode 100644
index 0000000..b7809ed
--- /dev/null
+++ b/debian/patches/07_non-linux-ip-addr.patch
@@ -0,0 +1,51 @@
+Description: Add non-linux version of sockGetIP in plugins/bladesio1/gui.c
+ Code was copied from correct version in plugins/dfnet/gui.c
+Author: James Cowgill <jcowgill at debian.org>
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/plugins/bladesio1/gui.c
++++ b/plugins/bladesio1/gui.c
+@@ -27,7 +27,6 @@
+ 
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+-#include <linux/if.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
+@@ -40,6 +39,11 @@
+ 
+ /***************************************************************************/
+ 
++#ifdef __linux__
++
++#include <sys/ioctl.h>
++#include <linux/if.h>
++
+ #define MAXINTERFACES 16
+ 
+ void sockGetIP(char *IPAddress) {
+@@ -67,6 +71,22 @@ void sockGetIP(char *IPAddress) {
+ 	}
+ }
+ 
++#else
++
++void sockGetIP(char *IPAddress) {
++	struct hostent *host;
++	char str[256];
++
++	gethostname(str, 256);
++	host = gethostbyname(str);
++
++	if (host != NULL)
++		strcpy(IPAddress, inet_ntoa(*((struct in_addr *)host->h_addr_list[0])));
++	else strcpy(IPAddress, "127.0.0.1");
++}
++
++#endif
++
+ void cfgSysMessage(const char *fmt, ...) {
+ 	GtkWidget *MsgDlg;
+ 	va_list list;
diff --git a/debian/patches/series b/debian/patches/series
index 0b39d53..8406d06 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 04_update-homedir-symlinks.patch
 05_format-security.patch
 06_warnings.patch
+07_non-linux-ip-addr.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/pcsxr.git



More information about the Pkg-games-commits mailing list