diff --git a/git-compat-util.h b/git-compat-util.h
index 1ac16bde5ab853098f857a64c6f0fea9f4c3437f..4236647c91a6ec554b03b1f238630a77444e6190 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
+#ifndef __sun__
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
+#endif
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _BSD_SOURCE 1
#define fstat_is_reliable() 1
#endif
+/*
+ * Preserves errno, prints a message, but gives no warning for ENOENT.
+ * Always returns the return value of unlink(2).
+ */
+int unlink_or_warn(const char *path);
+
#endif