fstools: backport changes to fix build error

Backport: "fstoools: add define for GLOB_ONLYDIR"
Fixes: #478
This commit is contained in:
AmadeusGhost 2021-09-30 23:03:18 +08:00
parent 8af77773f4
commit 88c0c42306

View File

@ -0,0 +1,32 @@
From 5345343828df944ae247d91cc77182f87559bc9a Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Wed, 25 Mar 2020 16:27:47 -0700
Subject: [PATCH] fstoools: add define for GLOB_ONLYDIR
This was originally a patch for musl. It is not present in musl as it is a
GNU extension.
Place it here where it belongs.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
libfstools/overlay.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libfstools/overlay.c b/libfstools/overlay.c
index 14214a3..39215d5 100644
--- a/libfstools/overlay.c
+++ b/libfstools/overlay.c
@@ -30,6 +30,10 @@
#include "libfstools.h"
#include "volume.h"
+#ifndef GLOB_ONLYDIR
+#define GLOB_ONLYDIR 0x100
+#endif
+
#define SWITCH_JFFS2 "/tmp/.switch_jffs2"
static bool keep_sysupgrade;
--
2.20.1