summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-05-12 16:42:51 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-05-12 16:42:51 -0700
commita2293e851ae93a004c0d1c6f8fbfc6b138869928 (patch)
tree007c5e85b143a06941656902fbf6bc185798634a
parentfbde5bf53c8bf2c3f7b1b99aa483e50dc6a97e99 (diff)
bsd_mouse: include sys/stat.h directly instead of relying on xf86_OSlib.h
xf86_OSlib.h used to include sys/stat.h but that was recently removed by xorg/xserver@5057c716eb5960f6971be620ce03a808d0f191ac so we need to do it here now. Fixes compiler errors: bsd_mouse.c: In function 'FindDevice': bsd_mouse.c:282:17: error: storage size of 'devMouseStat' isn't known 282 | struct stat devMouseStat; | ^~~~~~~~~~~~ bsd_mouse.c:283:17: error: storage size of 'sb' isn't known 283 | struct stat sb; | ^~ bsd_mouse.c:298:21: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration] 298 | if (fstat(fd, &devMouseStat) == 0) | ^~~~~ bsd_mouse.c:298:21: warning: nested extern declaration of 'fstat' [-Wnested-externs] bsd_mouse.c:283:17: warning: unused variable 'sb' [-Wunused-variable] 283 | struct stat sb; | ^~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/12>
-rw-r--r--src/bsd_mouse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index c1fac5b..e48cc72 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -29,6 +29,7 @@
#include <xorg-server.h>
#include <errno.h>
+#include <sys/stat.h>
#include <X11/X.h>
#include "xf86.h"