summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linkedlist.c6
-rw-r--r--src/linkedlist.h7
2 files changed, 4 insertions, 9 deletions
diff --git a/src/linkedlist.c b/src/linkedlist.c
index ae3d143..adedf8a 100644
--- a/src/linkedlist.c
+++ b/src/linkedlist.c
@@ -24,12 +24,6 @@
#include "linkedlist.h"
-#if __GNUC__ <= 3
-void
-prefetch(const void *x)
-{;}
-#endif
-
/*
* Insert a new entry between two known consecutive entries.
*
diff --git a/src/linkedlist.h b/src/linkedlist.h
index 4434766..42fee3d 100644
--- a/src/linkedlist.h
+++ b/src/linkedlist.h
@@ -76,10 +76,11 @@ void list_add(struct list_head *new, struct list_head *head);
void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next);
-#if __GNUC__ > 3
-#define prefetch __builtin_prefetch
+
+#ifdef HAVE___BUILTIN_PREFETCH
+#define prefetch(x) __builtin_prefetch(x)
#else
-void prefetch(const void *x);
+#define prefetch(x) ((void)(x))
#endif
/* Return the last element in the list. */