Remove __attribute__((overloadable))
The new FORTIFY removes this attribute from the non-FORTIFY'ed variants
of open. In order to keep clang happy, we need to remove it from here,
too.
Since system headers updates are apparently really difficult to do at
the same time as other changes, this includes a hack to make this file
compatible with old and new FORTIFYs. The hack (not the whole patch) is
intended to be reverted when the new FORTIFY has settled.
BUG=None
TEST=Builds with the new FORTIFY
Change-Id: I48e7211983bde200c37edcb0e5cc2f5f349cfd12
Reviewed-on: https://chromium-review.googlesource.com/756291
Commit-Ready: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
diff --git a/client/deps/fakegudev/src/fakesyscalls.c b/client/deps/fakegudev/src/fakesyscalls.c
index d16f469..0942c94 100644
--- a/client/deps/fakegudev/src/fakesyscalls.c
+++ b/client/deps/fakegudev/src/fakesyscalls.c
@@ -6,6 +6,12 @@
#define _GNU_SOURCE /* for RTLD_NEXT in dlfcn.h */
+// FIXME(gbiv): Remove this after CL:756290 has been in for long enough to
+// apply everywhere. Without it, this file needs to be in one of two states,
+// depending on whether said CL has been applied. We can't "know" for sure,
+// since it's a change to system headers.
+#undef _FORTIFY_SOURCE
+
#include <glib.h>
#include <dlfcn.h>
@@ -186,12 +192,6 @@
g_strfreev (redirections);
}
-#ifdef __use_clang_fortify
-/* Clang-style FORTIFY requires that all FORTIFY'ed function redeclarations and
- * redefinitions be marked with the overloadable attribute.
- */
-__attribute__((overloadable))
-#endif
int
open (const char *pathname, int flags, ...)
{