]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
nettle: include config.h before checking for definitions
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 6 Apr 2019 06:34:43 +0000 (08:34 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 6 Apr 2019 10:33:07 +0000 (12:33 +0200)
This makes sure that we don't include the internal backport
if compiled with a version of nettle that includes that code.
We also exclude nettle/backport from the static analyzer's list
as it contains files outside our control (from nettle project).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
.gitlab-ci.yml
lib/nettle/backport/cfb8.c
lib/nettle/backport/cmac.c

index 66a9273ded5389adbf5cb44dd03be45e2c615e94..242b3587d30069b1cc23217f68d314c5f6bc5bfb 100644 (file)
@@ -281,7 +281,7 @@ static-analyzers.Fedora.x86_64:
   - scan-build --status-bugs -o scan-build-lib make -j$(nproc) -C lib
   - scan-build --status-bugs -o scan-build-lib make -j$(nproc) -C libdane
   - make -j$(nproc) -C src/gl && scan-build --status-bugs -o scan-build-lib make -j$(nproc) -C src
-  - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring -i lib/minitasn1 -j$(nproc) $CPPCHECK_OPTIONS
+  - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring -i lib/minitasn1 -i lib/nettle/backport -j$(nproc) $CPPCHECK_OPTIONS
   - cppcheck --force -q -Ilib/include -Igl/ -Ilibdane/ -I. --error-exitcode=1 libdane/ -j$(nproc) $CPPCHECK_OPTIONS
   after_script:
   - /bin/true
index 0febf647fd5318e17ab754f2857a1f5b2b5a63ea..e9816feb78a859695236dd159d0f8c5d10556cd4 100644 (file)
  * #############################################
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #ifndef HAVE_NETTLE_CFB8_ENCRYPT
 
 #include "cfb8.h"
index 0791775cfda71b5aa340a234199c4ea0e6aa00a8..a665f0ea6bb0dd7344c4f3e70f733a4c019f6930 100644 (file)
  * #############################################
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #ifndef HAVE_NETTLE_CMAC128_UPDATE
 
 #include <nettle/aes.h>