summaryrefslogtreecommitdiff
path: root/dtach.h
diff options
context:
space:
mode:
Diffstat (limited to 'dtach.h')
-rw-r--r--dtach.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/dtach.h b/dtach.h
index c4d39cb..40d0879 100644
--- a/dtach.h
+++ b/dtach.h
@@ -18,6 +18,18 @@
#ifndef dtach_h
#define dtach_h
+#if defined(__has_attribute)
+#if __has_attribute(unused)
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+#elif defined(__GNUC__) || defined(__clang__)
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
#include <config.h>
#include <errno.h>