summaryrefslogtreecommitdiff
path: root/libavutil/atomic_gcc.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-03-08 11:16:14 +0200
committerMartin Storsjö <martin@martin.st>2013-03-08 12:00:06 +0200
commit2240e92f052960693de55cf4924e80426dfaa965 (patch)
tree27701da9eee098f09371863f02770b91c13f0359 /libavutil/atomic_gcc.h
parent7c45087b8441441fc929a6df363f6fa010ef23b0 (diff)
atomic: Add include guards to the implementation headers
This makes them pass standalone compilation tests. Previously, they included atomic.h which included themselves again, leading to double definitions. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/atomic_gcc.h')
-rw-r--r--libavutil/atomic_gcc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/atomic_gcc.h b/libavutil/atomic_gcc.h
index e2f3fe1330..13713c82e0 100644
--- a/libavutil/atomic_gcc.h
+++ b/libavutil/atomic_gcc.h
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifndef AVUTIL_ATOMIC_GCC_H
+#define AVUTIL_ATOMIC_GCC_H
+
#include "atomic.h"
#define avpriv_atomic_int_get atomic_int_get_gcc
@@ -46,3 +49,5 @@ static inline void *atomic_ptr_cas_gcc(void * volatile *ptr,
{
return __sync_val_compare_and_swap(ptr, oldval, newval);
}
+
+#endif /* AVUTIL_ATOMIC_GCC_H */