commit 3f3e778719068a491162e93b085dd8fe015cc27b
parent 923ac09cb6e5d342d6347df72df0651ee33283e1
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Wed, 3 Apr 2019 18:34:22 +0200
build: Add support for including fallbacks for missing defines
Diffstat:
20 files changed, 75 insertions(+), 31 deletions(-)
diff --git a/src/crypto.c b/src/crypto.c
@@ -31,6 +31,7 @@
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/crypto.h"
/* RFC 3526, Section 2 */
diff --git a/src/eap-aka.c b/src/eap-aka.c
@@ -29,12 +29,12 @@
#include <errno.h>
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
-
-#include "crypto.h"
-#include "simutil.h"
-#include "simauth.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
+#include "src/crypto.h"
+#include "src/simutil.h"
+#include "src/simauth.h"
/*
* EAP-AKA specific values
diff --git a/src/eap-gtc.c b/src/eap-gtc.c
@@ -28,8 +28,9 @@
#include <errno.h>
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
struct eap_gtc_state {
char *password;
diff --git a/src/eap-md5.c b/src/eap-md5.c
@@ -28,8 +28,9 @@
#include <errno.h>
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
struct eap_md5_state {
char *secret;
diff --git a/src/eap-mschapv2.c b/src/eap-mschapv2.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/eap.h"
#include "src/eap-private.h"
#include "src/eap-mschapv2.h"
diff --git a/src/eap-peap.c b/src/eap-peap.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/eap.h"
#include "src/eap-private.h"
#include "src/eap-tls-common.h"
diff --git a/src/eap-pwd.c b/src/eap-pwd.c
@@ -28,10 +28,11 @@
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
-#include "crypto.h"
-#include "util.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
+#include "src/crypto.h"
+#include "src/util.h"
#define EAP_PWD_GROUP_DESC 19
#define EAP_PWD_RAND_FN 0x01
diff --git a/src/eap-sim.c b/src/eap-sim.c
@@ -30,13 +30,13 @@
#include <alloca.h>
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
-
-#include "crypto.h"
-#include "simutil.h"
-#include "simauth.h"
-#include "util.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
+#include "src/crypto.h"
+#include "src/simutil.h"
+#include "src/simauth.h"
+#include "src/util.h"
/*
* EAP-SIM authentication protocol.
diff --git a/src/eap-tls-common.c b/src/eap-tls-common.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/eap.h"
#include "src/eap-private.h"
#include "src/eap-tls-common.h"
diff --git a/src/eap-tls.c b/src/eap-tls.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/eap.h"
#include "src/eap-private.h"
#include "src/eap-tls-common.h"
diff --git a/src/eap-ttls.c b/src/eap-ttls.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/util.h"
#include "src/mschaputil.h"
#include "src/eap.h"
diff --git a/src/eap-wsc.c b/src/eap-wsc.c
@@ -29,12 +29,13 @@
#include <errno.h>
#include <ell/ell.h>
-#include "crypto.h"
-#include "eap.h"
-#include "eap-private.h"
-#include "wscutil.h"
-#include "util.h"
-#include "eap-wsc.h"
+#include "src/missing.h"
+#include "src/crypto.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
+#include "src/wscutil.h"
+#include "src/util.h"
+#include "src/eap-wsc.h"
#define EAP_WSC_HEADER_LEN 14
#define EAP_WSC_PDU_MAX_LEN 4096
diff --git a/src/eap.c b/src/eap.c
@@ -30,8 +30,9 @@
#include <string.h>
#include <ell/ell.h>
-#include "eap.h"
-#include "eap-private.h"
+#include "src/missing.h"
+#include "src/eap.h"
+#include "src/eap-private.h"
static uint32_t default_mtu;
struct l_queue *eap_methods;
diff --git a/src/eapol.c b/src/eapol.c
@@ -30,6 +30,7 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/crypto.h"
#include "src/eapol.h"
#include "src/ie.h"
diff --git a/src/handshake.c b/src/handshake.c
@@ -36,6 +36,7 @@
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/crypto.h"
#include "src/ie.h"
#include "src/util.h"
diff --git a/src/missing.h b/src/missing.h
@@ -0,0 +1,29 @@
+/*
+ *
+ * Wireless daemon for Linux
+ *
+ * Copyright (C) 2013-2014 Intel Corporation. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef HAVE_EXPLICIT_BZERO
+static inline void explicit_bzero(void *s, size_t n)
+{
+ memset(s, 0, n);
+ __asm__ __volatile__ ("" : : "r"(s) : "memory");
+}
+#endif
diff --git a/src/mschaputil.c b/src/mschaputil.c
@@ -26,6 +26,7 @@
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/mschaputil.h"
/**
diff --git a/src/network.c b/src/network.c
@@ -32,9 +32,9 @@
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/ie.h"
#include "src/crypto.h"
-
#include "src/iwd.h"
#include "src/common.h"
#include "src/storage.h"
diff --git a/src/simutil.c b/src/simutil.c
@@ -25,8 +25,8 @@
#include <errno.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/eap-private.h"
-
#include "src/crypto.h"
#include "src/simutil.h"
diff --git a/src/wsc.c b/src/wsc.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <ell/ell.h>
+#include "src/missing.h"
#include "src/dbus.h"
#include "src/netdev.h"
#include "src/wiphy.h"