403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/emulators/pcsxr/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/emulators/pcsxr/files/patch-plugins-bladesio1-gui.c
--- plugins/bladesio1/gui.c.orig	2020-09-07 22:26:23 UTC
+++ plugins/bladesio1/gui.c
@@ -26,8 +26,6 @@
 #include <gtk/gtk.h>
 
 #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 +38,11 @@
 
 /***************************************************************************/
 
+#ifdef __linux__
+
+#include <sys/ioctl.h>
+#include <linux/if.h>
+
 #define MAXINTERFACES 16
 
 void sockGetIP(char *IPAddress) {
@@ -66,6 +69,22 @@ void sockGetIP(char *IPAddress) {
 		close(fd);
 	}
 }
+
+#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;

Youez - 2016 - github.com/yon3zu
LinuXploit