* [f2fs-dev] [PATCH] Check fallthrough in mount.h for Mac
@ 2022-05-26 0:21 Jaegeuk Kim
0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2022-05-26 0:21 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/os/base.h:128:23: error: missing ')' after 'do'
^~~~~~~~~~~
external/f2fs-tools/include/f2fs_fs.h:81:24: note: expanded from macro 'fallthrough'
~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/os/base.h:128:22: note: to match this '('
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
include/f2fs_fs.h | 6 ++++++
lib/libf2fs.c | 3 ---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index ad2798cf388c..21a7e70d952d 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -77,11 +77,17 @@
#define static_assert _Static_assert
#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+
+#ifndef fallthrough
#ifdef __clang__
#define fallthrough do {} while (0) /* fall through */
#else
#define fallthrough __attribute__((__fallthrough__))
#endif
+#endif
#ifdef _WIN32
#undef HAVE_LINUX_TYPES_H
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 36b8c25980ab..ecaa2e9d1ad5 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -22,9 +22,6 @@
#endif
#include <time.h>
#include <sys/stat.h>
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
--
2.36.1.124.g0e6072fb45-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-26 0:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 0:21 [f2fs-dev] [PATCH] Check fallthrough in mount.h for Mac Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).