]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Set #pragma once for build.h
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2022 13:58:20 +0000 (14:58 +0100)
committerFlole <Flole998@users.noreply.github.com>
Tue, 9 Sep 2025 18:31:27 +0000 (20:31 +0200)
The header is included all over the place and hence also multiple times
in the same translation unit which triggers -Wredundant-decls, beside
being pointless, so we just tell the pre-processor with a slightly more
modern form of a header guard that once is enough.

As a bonus, this commit keeps the 'DO NOT EDIT' remark as intended.

support/configure.inc

index 821102fbbfa4aa8171844935e9dde2234cbd684a..905685cb5d4ea7d1b9cd190dbb1c6ea6ce09832b 100755 (executable)
@@ -527,10 +527,11 @@ EOF
   CONFIG_H="${BUILDDIR}/build.h"
   cat > "${CONFIG_H}" <<EOF
 // Automatically generated by configure - DO NOT EDIT!
+#pragma once
 EOF
 
   # Create Platform defines
-  cat > ${CONFIG_H} <<EOF
+  cat >> ${CONFIG_H} <<EOF
 #define PLATFORM_$(toupper ${PLATFORM}) 1
 EOF