Skip to contentSkip to conversation

fswatch: add missing limits.h include for NAME_MAX

PATCH New maxice8 1 participant 1 message Jul 25, 2018

lore
Share & tools
lore

maxice8

author
#0 lore raw

PATCH 1/1 fswatch: add missing limits.h include for NAME_MAX

From: William Maxwell <[email protected]>

fixes compilation on stricter libcs like Musl.

ell/fswatch.c: In function 'inotify_read_cb':
ell/fswatch.c:80:45: error: 'NAME_MAX' undeclared (first use in this function); did you mean 'SIZE_MAX'?
uint8_t buf[sizeof(struct inotify_event) + NAME_MAX + 1]

                                             ^~~~~~~~
                                             SIZE_MAX
---
 ell/fswatch.c | 1 +
 1 file changed, 1 insertion(+)
ell/fswatch.c +1 -0
index c65a1b9..c5980d3 100644
@@ -26,6 +26,7 @@
 
 #include <dirent.h>
 #include <unistd.h>
+#include <limits.h>
 #include <sys/inotify.h>
 
 #include "private.h"
Signature · 1 line
2.18.0