]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: import: guard plock.h against multiple inclusion
authorWilly Tarreau <w@1wt.eu>
Sat, 26 Aug 2023 15:27:24 +0000 (17:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 26 Aug 2023 15:28:08 +0000 (17:28 +0200)
Surprisingly there's no include guard in plock.h though there is one in
atomic-ops.h. Let's add one, or we cannot risk including the file multiple
times.

include/import/plock.h

index 4fc258d0bcd447b6c356cd3732d1f647ec4f3a4b..0ac7020b1b6188f5d9c11f6cd1ec9e12857191b3 100644 (file)
@@ -23,6 +23,9 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#ifndef PL_PLOCK_H
+#define PL_PLOCK_H
+
 #include "atomic-ops.h"
 #ifdef _POSIX_PRIORITY_SCHEDULING
 #include <sched.h>
@@ -1415,3 +1418,5 @@ static inline void pl_lorw_unlock(unsigned long *lock)
        else
                pl_lorw_rdunlock(lock);
 }
+
+#endif /* PL_PLOCK_H */