summaryrefslogtreecommitdiff
path: root/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch
blob: 8aebb50672a1f1bf16a97b51a5af76ab42b790fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
https://gitlab.com/sane-project/backends/-/commit/12560890a6e298091bd63b8093a35604416eb92a

From 12560890a6e298091bd63b8093a35604416eb92a Mon Sep 17 00:00:00 2001
From: David Ward <david.ward@gatech.edu>
Date: Thu, 21 Apr 2022 23:37:33 -0400
Subject: [PATCH] Fix header file used for poll()

POSIX specifies the header to include is <poll.h>, not <sys/poll.h>.
This results in a compiler warning with musl libc (on Alpine Linux).
--- a/configure.ac
+++ b/configure.ac
@@ -202,7 +202,7 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
     sys/time.h sys/shm.h sys/ipc.h sys/scanio.h os2.h \
     sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \
-    dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h sys/poll.h \
+    dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h poll.h \
     windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\
     netinet/in.h tiffio.h ifaddrs.h pwd.h getopt.h)
 AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
--- a/frontend/saned.c
+++ b/frontend/saned.c
@@ -84,8 +84,8 @@
 
 #include "lgetopt.h"
 
-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
-# include <sys/poll.h>
+#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
+# include <poll.h>
 #else
 /*
  * This replacement poll() using select() is only designed to cover
GitLab