[Asterisk-code-review] Remove #include <sys/cdefs.h> (asterisk[13])

Friendly Automation asteriskteam at digium.com
Tue May 5 09:22:53 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14337 )

Change subject: Remove #include <sys/cdefs.h>
......................................................................

Remove #include <sys/cdefs.h>

These are not provided by standards, and as a result causes failure to
compile on musl.

https://wiki.musl-libc.org/faq.html#Q:-When-compiling-something-against-musl,-I-get-error-messages-about-%3Ccode%3Esys/cdefs.h%3C/code%3E

Change-Id: I6a357cefd106c72cfecafd898638f6b5692c2e05
---
M main/ast_expr2.c
M main/ast_expr2.y
M main/editline/np/unvis.c
M main/editline/np/vis.c
M main/editline/np/vis.h
M main/editline/sys.h
M utils/db1-ast/include/db.h
7 files changed, 0 insertions(+), 11 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/main/ast_expr2.c b/main/ast_expr2.c
index 4699b46..9bfd8d5 100644
--- a/main/ast_expr2.c
+++ b/main/ast_expr2.c
@@ -93,7 +93,6 @@
 
 #include "asterisk.h"
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>
 
diff --git a/main/ast_expr2.y b/main/ast_expr2.y
index 08ed76a..3cc58b2 100644
--- a/main/ast_expr2.y
+++ b/main/ast_expr2.y
@@ -14,7 +14,6 @@
 
 #include "asterisk.h"
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>
 
diff --git a/main/editline/np/unvis.c b/main/editline/np/unvis.c
index 0a26e3d..836252c 100644
--- a/main/editline/np/unvis.c
+++ b/main/editline/np/unvis.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
 #if 0
 static char sccsid[] = "@(#)unvis.c	8.1 (Berkeley) 6/4/93";
diff --git a/main/editline/np/vis.c b/main/editline/np/vis.c
index 264dce6..065834c 100644
--- a/main/editline/np/vis.c
+++ b/main/editline/np/vis.c
@@ -34,7 +34,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
 __RCSID("$NetBSD: vis.c,v 1.22 2002/03/23 17:38:27 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
diff --git a/main/editline/np/vis.h b/main/editline/np/vis.h
index 0739c1d..6c44867 100644
--- a/main/editline/np/vis.h
+++ b/main/editline/np/vis.h
@@ -74,8 +74,6 @@
  */
 #define	UNVIS_END	1	/* no more characters */
 
-#include <sys/cdefs.h>
-
 __BEGIN_DECLS
 char	*vis __P((char *, int, int, int));
 char	*svis __P((char *, int, int, int, const char *));
diff --git a/main/editline/sys.h b/main/editline/sys.h
index 80feb57..bc117db 100644
--- a/main/editline/sys.h
+++ b/main/editline/sys.h
@@ -128,8 +128,4 @@
 extern char    *fgetline(FILE *, int *);
 #endif
 
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
 #endif /* _h_sys */
diff --git a/utils/db1-ast/include/db.h b/utils/db1-ast/include/db.h
index 23b9b95..30f73e2 100644
--- a/utils/db1-ast/include/db.h
+++ b/utils/db1-ast/include/db.h
@@ -37,7 +37,6 @@
 #define	_DB_H 1
 
 #include <sys/types.h>
-#include <sys/cdefs.h>
 
 #include <limits.h>
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14337
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I6a357cefd106c72cfecafd898638f6b5692c2e05
Gerrit-Change-Number: 14337
Gerrit-PatchSet: 2
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200505/2e921561/attachment.html>


More information about the asterisk-code-review mailing list