Files
libwlocate/libwlocate-0.1-gcc-15.patch

47 lines
1.4 KiB
Diff

diff -ru lwlocate-0.1/master.orig/connect.c lwlocate-0.1/master/connect.c
--- lwlocate-0.1/master.orig/connect.c 2016-03-09 14:55:54.000000000 +0100
+++ lwlocate-0.1/master/connect.c 2026-01-01 14:48:44.785929306 +0100
@@ -19,6 +19,7 @@
#include <string.h>
#include <stdio.h>
#include <math.h>
+#include <time.h>
#ifdef ENV_WINDOWS
#include <winsock2.h>
@@ -53,7 +54,10 @@
#ifdef ENV_WINDOWS
Sleep(msecs);
#else
- usleep(msecs*1000);
+ struct timespec ts;
+ ts.tv_sec = msecs / 1000;
+ ts.tv_nsec = (msecs % 1000) * 1000000L;
+ nanosleep(&ts, NULL);
#endif
return msecs;
}
@@ -218,7 +222,7 @@
host = gethostbyname (address); // deprecated by posix standard?
if (host)
{
- memcpy (&nl, host->h_addr, sizeof(unsigned long));
+ memcpy (&nl, host->h_addr_list[0], sizeof(unsigned long));
a.sin_addr.s_addr = nl;
}
else
Only in lwlocate-0.1/master: connect.o
diff -ru lwlocate-0.1/master.orig/iwlist.c lwlocate-0.1/master/iwlist.c
--- lwlocate-0.1/master.orig/iwlist.c 2016-03-09 14:55:54.000000000 +0100
+++ lwlocate-0.1/master/iwlist.c 2026-01-01 14:46:54.149472307 +0100
@@ -14,6 +14,7 @@
#include "iwlib.h" /* Header */
#include "libwlocate.h"
#include <sys/time.h>
+#include <strings.h>
static struct wloc_req *g_request;
static struct iwscan_state state;
Only in lwlocate-0.1/master: iwlist.o
Only in lwlocate-0.1/master: libwlocate.so