uatomic/generic: Fix redundant declaration warning
authorOlivier Dion <odion@efficios.com>
Mon, 14 Aug 2023 22:57:23 +0000 (18:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Aug 2023 12:30:30 +0000 (08:30 -0400)
abort(3) was explicitly declared external to avoid including
<stdlib.h>. However, this emit a redundant declaration warning if it was
already declared before including <urcu/uatomic.h>.

Fix this by including <stdlib.h> and not declaring abort().

Change-Id: If9557814c311e2b531e85fec8c41788462338fe4
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/urcu/uatomic/generic.h

index afc5185e18aa07a080e2d05ae2f086d4fc0040c8..8f8c43785ba0c7609d827ab41a6d5d5882dca0ab 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <stdint.h>
+#include <stdlib.h>
 #include <urcu/compiler.h>
 #include <urcu/system.h>
 
@@ -26,8 +27,6 @@ extern "C" {
 #define uatomic_set(addr, v)   ((void) CMM_STORE_SHARED(*(addr), (v)))
 #endif
 
-extern void abort(void);
-
 #define uatomic_load_store_return_op(op, addr, v, mo)                  \
        __extension__                                                   \
        ({                                                              \
This page took 0.027064 seconds and 4 git commands to generate.