inotify-tools: fix compilation with musl 1.2.4

Fixes errors in the form of:
inotifytools.c: In function 'inotifytools_watch_recursively_with_exclude':
inotifytools.c:1335:30: error: storage size of 'my_stat' isn't known
 1335 |         static struct stat64 my_stat;
      |                              ^~~~~~~
inotifytools.c:1342:36: error: implicit declaration of function 'lstat64'; did you mean 'lstat'? [-Werror=implicit-function-declaration]
 1342 |                         if ( -1 == lstat64( next_file, &my_stat ) ) {
      |                                    ^~~~~~~
      |                                    lstat
inotifytools.c:1335:30: error: unused variable 'my_stat' [-Werror=unused-variable]
 1335 |         static struct stat64 my_stat;
      |                              ^~~~~~~
inotifytools.c: In function 'isdir':
inotifytools.c:1621:30: error: storage size of 'my_stat' isn't known
 1621 |         static struct stat64 my_stat;
      |                              ^~~~~~~
inotifytools.c:1621:30: error: unused variable 'my_stat' [-Werror=unused-variable]
inotifytools.c:1630:1: error: control reaches end of non-void function [-Werror=return-type]
 1630 | }
      | ^
cc1: all warnings being treated as errors

Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2023-05-16 23:41:26 +02:00 committed by Tianling Shen
parent 5cd812bd6a
commit b84d35f577
1 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=inotify-tools
PKG_VERSION:=3.20.11.0
PKG_HASH:=58a3cde89e4a5111a87ac16b56b06a8f885460fca0aea51b69c856ce30a37a14
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://codeload.github.com/rvoicilas/inotify-tools/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -19,6 +19,10 @@ include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS+= --disable-doxygen
ifneq ($(CONFIG_USE_MUSL),)
TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
endif
define Build/Prepare
$(call Build/Prepare/Default)
$(CP) $(PKG_BUILD_DIR)/README.md $(PKG_BUILD_DIR)/README