master hovercats/oakiss / pkg / elftoolchain / patch / 0003-Revert-Add-back-sys-cdefs.h.patch
  1From a2b4fa9da830e1345df70c3372d6cfc14faf8f07 Mon Sep 17 00:00:00 2001
  2From: Michael Forney <mforney@mforney.org>
  3Date: Thu, 29 Apr 2021 12:09:05 -0700
  4Subject: [PATCH] Revert "Add back <sys/cdefs.h>."
  5
  6This reverts commit 301fff723d18730ade4ef4034ed36fd6369f1886.
  7---
  8 libelf/elf.c               | 2 --
  9 libelf/elf_begin.c         | 2 --
 10 libelf/elf_cntl.c          | 2 --
 11 libelf/elf_data.c          | 2 --
 12 libelf/elf_end.c           | 2 --
 13 libelf/elf_errmsg.c        | 2 --
 14 libelf/elf_errno.c         | 2 --
 15 libelf/elf_fill.c          | 2 --
 16 libelf/elf_flag.c          | 2 --
 17 libelf/elf_getarhdr.c      | 2 --
 18 libelf/elf_getarsym.c      | 2 --
 19 libelf/elf_getbase.c       | 2 --
 20 libelf/elf_getident.c      | 2 --
 21 libelf/elf_getversion.c    | 2 --
 22 libelf/elf_hash.c          | 2 --
 23 libelf/elf_kind.c          | 2 --
 24 libelf/elf_memory.c        | 2 --
 25 libelf/elf_next.c          | 2 --
 26 libelf/elf_open.c          | 2 --
 27 libelf/elf_phnum.c         | 2 --
 28 libelf/elf_rand.c          | 2 --
 29 libelf/elf_rawfile.c       | 2 --
 30 libelf/elf_scn.c           | 1 -
 31 libelf/elf_shnum.c         | 2 --
 32 libelf/elf_shstrndx.c      | 2 --
 33 libelf/elf_strptr.c        | 1 -
 34 libelf/elf_update.c        | 1 -
 35 libelf/elf_version.c       | 2 --
 36 libelf/gelf_cap.c          | 2 --
 37 libelf/gelf_checksum.c     | 2 --
 38 libelf/gelf_dyn.c          | 2 --
 39 libelf/gelf_ehdr.c         | 2 --
 40 libelf/gelf_fsize.c        | 2 --
 41 libelf/gelf_getclass.c     | 2 --
 42 libelf/gelf_move.c         | 2 --
 43 libelf/gelf_phdr.c         | 2 --
 44 libelf/gelf_rel.c          | 2 --
 45 libelf/gelf_rela.c         | 2 --
 46 libelf/gelf_shdr.c         | 2 --
 47 libelf/gelf_sym.c          | 2 --
 48 libelf/gelf_syminfo.c      | 2 --
 49 libelf/gelf_symshndx.c     | 2 --
 50 libelf/gelf_xlate.c        | 2 --
 51 libelf/libelf_allocate.c   | 2 --
 52 libelf/libelf_ar.c         | 2 --
 53 libelf/libelf_ar_util.c    | 2 --
 54 libelf/libelf_checksum.c   | 2 --
 55 libelf/libelf_convert.m4   | 2 --
 56 libelf/libelf_data.c       | 2 --
 57 libelf/libelf_ehdr.c       | 2 --
 58 libelf/libelf_elfmachine.c | 2 --
 59 libelf/libelf_extended.c   | 2 --
 60 libelf/libelf_fsize.m4     | 2 --
 61 libelf/libelf_memory.c     | 2 --
 62 libelf/libelf_msize.m4     | 2 --
 63 libelf/libelf_open.c       | 1 -
 64 libelf/libelf_phdr.c       | 2 --
 65 libelf/libelf_shdr.c       | 2 --
 66 libelf/libelf_xlate.c      | 2 --
 67 59 files changed, 114 deletions(-)
 68
 69diff --git a/libelf/elf.c b/libelf/elf.c
 70index 3eac4f47..b391c43a 100644
 71--- a/libelf/elf.c
 72+++ b/libelf/elf.c
 73@@ -24,8 +24,6 @@
 74  * SUCH DAMAGE.
 75  */
 76 
 77-#include <sys/cdefs.h>
 78-
 79 #include <libelf.h>
 80 
 81 #include "_libelf.h"
 82diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
 83index f7b1b552..0eccc5f8 100644
 84--- a/libelf/elf_begin.c
 85+++ b/libelf/elf_begin.c
 86@@ -24,8 +24,6 @@
 87  * SUCH DAMAGE.
 88  */
 89 
 90-#include <sys/cdefs.h>
 91-
 92 #include <libelf.h>
 93 
 94 #include "_libelf.h"
 95diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
 96index 92efa3b4..0f892fd4 100644
 97--- a/libelf/elf_cntl.c
 98+++ b/libelf/elf_cntl.c
 99@@ -24,8 +24,6 @@
100  * SUCH DAMAGE.
101  */
102 
103-#include <sys/cdefs.h>
104-
105 #include <libelf.h>
106 
107 #include "_libelf.h"
108diff --git a/libelf/elf_data.c b/libelf/elf_data.c
109index 9101c1ac..0a380464 100644
110--- a/libelf/elf_data.c
111+++ b/libelf/elf_data.c
112@@ -24,8 +24,6 @@
113  * SUCH DAMAGE.
114  */
115 
116-#include <sys/cdefs.h>
117-
118 #include <assert.h>
119 #include <errno.h>
120 #include <libelf.h>
121diff --git a/libelf/elf_end.c b/libelf/elf_end.c
122index c5920c11..8e483236 100644
123--- a/libelf/elf_end.c
124+++ b/libelf/elf_end.c
125@@ -24,8 +24,6 @@
126  * SUCH DAMAGE.
127  */
128 
129-#include <sys/cdefs.h>
130-
131 #include <assert.h>
132 #include <libelf.h>
133 #include <stdlib.h>
134diff --git a/libelf/elf_errmsg.c b/libelf/elf_errmsg.c
135index de242828..e5f54762 100644
136--- a/libelf/elf_errmsg.c
137+++ b/libelf/elf_errmsg.c
138@@ -24,8 +24,6 @@
139  * SUCH DAMAGE.
140  */
141 
142-#include <sys/cdefs.h>
143-
144 #include <libelf.h>
145 #include <stdio.h>
146 #include <string.h>
147diff --git a/libelf/elf_errno.c b/libelf/elf_errno.c
148index baf6c0d7..056f129e 100644
149--- a/libelf/elf_errno.c
150+++ b/libelf/elf_errno.c
151@@ -24,8 +24,6 @@
152  * SUCH DAMAGE.
153  */
154 
155-#include <sys/cdefs.h>
156-
157 #include <libelf.h>
158 
159 #include "_libelf.h"
160diff --git a/libelf/elf_fill.c b/libelf/elf_fill.c
161index a6499182..bddec5d1 100644
162--- a/libelf/elf_fill.c
163+++ b/libelf/elf_fill.c
164@@ -24,8 +24,6 @@
165  * SUCH DAMAGE.
166  */
167 
168-#include <sys/cdefs.h>
169-
170 #include <libelf.h>
171 
172 #include "_libelf.h"
173diff --git a/libelf/elf_flag.c b/libelf/elf_flag.c
174index 0e68ef08..9c56cfac 100644
175--- a/libelf/elf_flag.c
176+++ b/libelf/elf_flag.c
177@@ -24,8 +24,6 @@
178  * SUCH DAMAGE.
179  */
180 
181-#include <sys/cdefs.h>
182-
183 #include <libelf.h>
184 
185 #include "_libelf.h"
186diff --git a/libelf/elf_getarhdr.c b/libelf/elf_getarhdr.c
187index 139ff36d..1a33171e 100644
188--- a/libelf/elf_getarhdr.c
189+++ b/libelf/elf_getarhdr.c
190@@ -24,8 +24,6 @@
191  * SUCH DAMAGE.
192  */
193 
194-#include <sys/cdefs.h>
195-
196 #include <libelf.h>
197 
198 #include "_libelf.h"
199diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
200index e9bd479e..4bfaf7f7 100644
201--- a/libelf/elf_getarsym.c
202+++ b/libelf/elf_getarsym.c
203@@ -24,8 +24,6 @@
204  * SUCH DAMAGE.
205  */
206 
207-#include <sys/cdefs.h>
208-
209 #include <libelf.h>
210 
211 #include "_libelf.h"
212diff --git a/libelf/elf_getbase.c b/libelf/elf_getbase.c
213index fe378afa..c42c0649 100644
214--- a/libelf/elf_getbase.c
215+++ b/libelf/elf_getbase.c
216@@ -24,8 +24,6 @@
217  * SUCH DAMAGE.
218  */
219 
220-#include <sys/cdefs.h>
221-
222 #include <libelf.h>
223 
224 #include "_libelf.h"
225diff --git a/libelf/elf_getident.c b/libelf/elf_getident.c
226index 701b1f20..c7d33a28 100644
227--- a/libelf/elf_getident.c
228+++ b/libelf/elf_getident.c
229@@ -24,8 +24,6 @@
230  * SUCH DAMAGE.
231  */
232 
233-#include <sys/cdefs.h>
234-
235 #include <ar.h>
236 #include <assert.h>
237 #include <libelf.h>
238diff --git a/libelf/elf_getversion.c b/libelf/elf_getversion.c
239index 24e68e6d..b967453c 100644
240--- a/libelf/elf_getversion.c
241+++ b/libelf/elf_getversion.c
242@@ -24,8 +24,6 @@
243  * THE POSSIBILITY OF SUCH DAMAGE.
244  */
245 
246-#include <sys/cdefs.h>
247-
248 #include <libelf.h>
249 
250 #include "_libelf.h"
251diff --git a/libelf/elf_hash.c b/libelf/elf_hash.c
252index 8d20acbd..f61e8268 100644
253--- a/libelf/elf_hash.c
254+++ b/libelf/elf_hash.c
255@@ -24,8 +24,6 @@
256  * SUCH DAMAGE.
257  */
258 
259-#include <sys/cdefs.h>
260-
261 #include <libelf.h>
262 
263 #include "_libelf.h"
264diff --git a/libelf/elf_kind.c b/libelf/elf_kind.c
265index d182c37b..45989800 100644
266--- a/libelf/elf_kind.c
267+++ b/libelf/elf_kind.c
268@@ -24,8 +24,6 @@
269  * SUCH DAMAGE.
270  */
271 
272-#include <sys/cdefs.h>
273-
274 #include <libelf.h>
275 
276 #include "_libelf.h"
277diff --git a/libelf/elf_memory.c b/libelf/elf_memory.c
278index 21cf2d2d..0544998c 100644
279--- a/libelf/elf_memory.c
280+++ b/libelf/elf_memory.c
281@@ -24,8 +24,6 @@
282  * SUCH DAMAGE.
283  */
284 
285-#include <sys/cdefs.h>
286-
287 #include <libelf.h>
288 
289 #include "_libelf.h"
290diff --git a/libelf/elf_next.c b/libelf/elf_next.c
291index 66fd2e22..e2fe9a2b 100644
292--- a/libelf/elf_next.c
293+++ b/libelf/elf_next.c
294@@ -24,8 +24,6 @@
295  * SUCH DAMAGE.
296  */
297 
298-#include <sys/cdefs.h>
299-
300 #include <ar.h>
301 #include <assert.h>
302 #include <libelf.h>
303diff --git a/libelf/elf_open.c b/libelf/elf_open.c
304index 577bcc7f..adad0610 100644
305--- a/libelf/elf_open.c
306+++ b/libelf/elf_open.c
307@@ -24,8 +24,6 @@
308  * SUCH DAMAGE.
309  */
310 
311-#include <sys/cdefs.h>
312-
313 #include <libelf.h>
314 
315 #include "_libelf.h"
316diff --git a/libelf/elf_phnum.c b/libelf/elf_phnum.c
317index 3ade2c45..3d2b1bcd 100644
318--- a/libelf/elf_phnum.c
319+++ b/libelf/elf_phnum.c
320@@ -24,8 +24,6 @@
321  * SUCH DAMAGE.
322  */
323 
324-#include <sys/cdefs.h>
325-
326 #include <ar.h>
327 #include <libelf.h>
328 
329diff --git a/libelf/elf_rand.c b/libelf/elf_rand.c
330index 6946fa6a..eafb0686 100644
331--- a/libelf/elf_rand.c
332+++ b/libelf/elf_rand.c
333@@ -24,8 +24,6 @@
334  * SUCH DAMAGE.
335  */
336 
337-#include <sys/cdefs.h>
338-
339 #include <ar.h>
340 #include <libelf.h>
341 
342diff --git a/libelf/elf_rawfile.c b/libelf/elf_rawfile.c
343index cd048e3a..5a5452b5 100644
344--- a/libelf/elf_rawfile.c
345+++ b/libelf/elf_rawfile.c
346@@ -24,8 +24,6 @@
347  * SUCH DAMAGE.
348  */
349 
350-#include <sys/cdefs.h>
351-
352 #include <libelf.h>
353 
354 #include "_libelf.h"
355diff --git a/libelf/elf_scn.c b/libelf/elf_scn.c
356index 2557581a..dfa77f53 100644
357--- a/libelf/elf_scn.c
358+++ b/libelf/elf_scn.c
359@@ -24,7 +24,6 @@
360  * SUCH DAMAGE.
361  */
362 
363-#include <sys/cdefs.h>
364 #include <sys/queue.h>
365 
366 #include <assert.h>
367diff --git a/libelf/elf_shnum.c b/libelf/elf_shnum.c
368index 4319a249..fbc0d0d5 100644
369--- a/libelf/elf_shnum.c
370+++ b/libelf/elf_shnum.c
371@@ -24,8 +24,6 @@
372  * SUCH DAMAGE.
373  */
374 
375-#include <sys/cdefs.h>
376-
377 #include <ar.h>
378 #include <libelf.h>
379 
380diff --git a/libelf/elf_shstrndx.c b/libelf/elf_shstrndx.c
381index 90c4b57a..ef62285d 100644
382--- a/libelf/elf_shstrndx.c
383+++ b/libelf/elf_shstrndx.c
384@@ -24,8 +24,6 @@
385  * SUCH DAMAGE.
386  */
387 
388-#include <sys/cdefs.h>
389-
390 #include <ar.h>
391 #include <libelf.h>
392 
393diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c
394index 6a9e7c5d..5c594b45 100644
395--- a/libelf/elf_strptr.c
396+++ b/libelf/elf_strptr.c
397@@ -24,7 +24,6 @@
398  * SUCH DAMAGE.
399  */
400 
401-#include <sys/cdefs.h>
402 #include <sys/param.h>
403 
404 #include <assert.h>
405diff --git a/libelf/elf_update.c b/libelf/elf_update.c
406index baf64809..3e19b78a 100644
407--- a/libelf/elf_update.c
408+++ b/libelf/elf_update.c
409@@ -24,7 +24,6 @@
410  * SUCH DAMAGE.
411  */
412 
413-#include <sys/cdefs.h>
414 #include <sys/param.h>
415 #include <sys/stat.h>
416 
417diff --git a/libelf/elf_version.c b/libelf/elf_version.c
418index 4d4d9e06..f2037a16 100644
419--- a/libelf/elf_version.c
420+++ b/libelf/elf_version.c
421@@ -24,8 +24,6 @@
422  * SUCH DAMAGE.
423  */
424 
425-#include <sys/cdefs.h>
426-
427 #include <libelf.h>
428 
429 #include "_libelf.h"
430diff --git a/libelf/gelf_cap.c b/libelf/gelf_cap.c
431index ed63d793..2e82fdf2 100644
432--- a/libelf/gelf_cap.c
433+++ b/libelf/gelf_cap.c
434@@ -24,8 +24,6 @@
435  * SUCH DAMAGE.
436  */
437 
438-#include <sys/cdefs.h>
439-
440 #include <assert.h>
441 #include <gelf.h>
442 #include <limits.h>
443diff --git a/libelf/gelf_checksum.c b/libelf/gelf_checksum.c
444index ae1f1015..d29dd25f 100644
445--- a/libelf/gelf_checksum.c
446+++ b/libelf/gelf_checksum.c
447@@ -24,8 +24,6 @@
448  * SUCH DAMAGE.
449  */
450 
451-#include <sys/cdefs.h>
452-
453 #include <gelf.h>
454 #include <libelf.h>
455 
456diff --git a/libelf/gelf_dyn.c b/libelf/gelf_dyn.c
457index 950b9a72..653d39a5 100644
458--- a/libelf/gelf_dyn.c
459+++ b/libelf/gelf_dyn.c
460@@ -24,8 +24,6 @@
461  * SUCH DAMAGE.
462  */
463 
464-#include <sys/cdefs.h>
465-
466 #include <assert.h>
467 #include <gelf.h>
468 #include <limits.h>
469diff --git a/libelf/gelf_ehdr.c b/libelf/gelf_ehdr.c
470index 30983333..d6b42c7c 100644
471--- a/libelf/gelf_ehdr.c
472+++ b/libelf/gelf_ehdr.c
473@@ -24,8 +24,6 @@
474  * SUCH DAMAGE.
475  */
476 
477-#include <sys/cdefs.h>
478-
479 #include <assert.h>
480 #include <gelf.h>
481 #include <libelf.h>
482diff --git a/libelf/gelf_fsize.c b/libelf/gelf_fsize.c
483index 8cfeb7cc..3eeeb80c 100644
484--- a/libelf/gelf_fsize.c
485+++ b/libelf/gelf_fsize.c
486@@ -24,8 +24,6 @@
487  * SUCH DAMAGE.
488  */
489 
490-#include <sys/cdefs.h>
491-
492 #include <gelf.h>
493 #include <libelf.h>
494 
495diff --git a/libelf/gelf_getclass.c b/libelf/gelf_getclass.c
496index eb8bfd4e..3e5bf4f3 100644
497--- a/libelf/gelf_getclass.c
498+++ b/libelf/gelf_getclass.c
499@@ -24,8 +24,6 @@
500  * SUCH DAMAGE.
501  */
502 
503-#include <sys/cdefs.h>
504-
505 #include <gelf.h>
506 
507 #include "_libelf.h"
508diff --git a/libelf/gelf_move.c b/libelf/gelf_move.c
509index d3f2011e..20bc0d86 100644
510--- a/libelf/gelf_move.c
511+++ b/libelf/gelf_move.c
512@@ -24,8 +24,6 @@
513  * SUCH DAMAGE.
514  */
515 
516-#include <sys/cdefs.h>
517-
518 #include <assert.h>
519 #include <gelf.h>
520 #include <limits.h>
521diff --git a/libelf/gelf_phdr.c b/libelf/gelf_phdr.c
522index 0ac2c8bf..5996910d 100644
523--- a/libelf/gelf_phdr.c
524+++ b/libelf/gelf_phdr.c
525@@ -24,8 +24,6 @@
526  * SUCH DAMAGE.
527  */
528 
529-#include <sys/cdefs.h>
530-
531 #include <gelf.h>
532 #include <libelf.h>
533 #include <limits.h>
534diff --git a/libelf/gelf_rel.c b/libelf/gelf_rel.c
535index 1a1459ab..60332597 100644
536--- a/libelf/gelf_rel.c
537+++ b/libelf/gelf_rel.c
538@@ -24,8 +24,6 @@
539  * SUCH DAMAGE.
540  */
541 
542-#include <sys/cdefs.h>
543-
544 #include <assert.h>
545 #include <gelf.h>
546 #include <limits.h>
547diff --git a/libelf/gelf_rela.c b/libelf/gelf_rela.c
548index 40f94da7..40462248 100644
549--- a/libelf/gelf_rela.c
550+++ b/libelf/gelf_rela.c
551@@ -24,8 +24,6 @@
552  * SUCH DAMAGE.
553  */
554 
555-#include <sys/cdefs.h>
556-
557 #include <assert.h>
558 #include <gelf.h>
559 #include <limits.h>
560diff --git a/libelf/gelf_shdr.c b/libelf/gelf_shdr.c
561index 9150776b..2248551e 100644
562--- a/libelf/gelf_shdr.c
563+++ b/libelf/gelf_shdr.c
564@@ -24,8 +24,6 @@
565  * SUCH DAMAGE.
566  */
567 
568-#include <sys/cdefs.h>
569-
570 #include <assert.h>
571 #include <gelf.h>
572 #include <libelf.h>
573diff --git a/libelf/gelf_sym.c b/libelf/gelf_sym.c
574index a8422395..998bfda2 100644
575--- a/libelf/gelf_sym.c
576+++ b/libelf/gelf_sym.c
577@@ -24,8 +24,6 @@
578  * SUCH DAMAGE.
579  */
580 
581-#include <sys/cdefs.h>
582-
583 #include <assert.h>
584 #include <gelf.h>
585 #include <limits.h>
586diff --git a/libelf/gelf_syminfo.c b/libelf/gelf_syminfo.c
587index ae6c8473..d97ab291 100644
588--- a/libelf/gelf_syminfo.c
589+++ b/libelf/gelf_syminfo.c
590@@ -24,8 +24,6 @@
591  * SUCH DAMAGE.
592  */
593 
594-#include <sys/cdefs.h>
595-
596 #include <assert.h>
597 #include <gelf.h>
598 
599diff --git a/libelf/gelf_symshndx.c b/libelf/gelf_symshndx.c
600index ab6e8519..0ba1cc08 100644
601--- a/libelf/gelf_symshndx.c
602+++ b/libelf/gelf_symshndx.c
603@@ -24,8 +24,6 @@
604  * SUCH DAMAGE.
605  */
606 
607-#include <sys/cdefs.h>
608-
609 #include <assert.h>
610 #include <gelf.h>
611 
612diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c
613index 228b17bf..af539a5a 100644
614--- a/libelf/gelf_xlate.c
615+++ b/libelf/gelf_xlate.c
616@@ -24,8 +24,6 @@
617  * SUCH DAMAGE.
618  */
619 
620-#include <sys/cdefs.h>
621-
622 #include <gelf.h>
623 #include <libelf.h>
624 #include <string.h>
625diff --git a/libelf/libelf_allocate.c b/libelf/libelf_allocate.c
626index 1387568e..3cf58ae7 100644
627--- a/libelf/libelf_allocate.c
628+++ b/libelf/libelf_allocate.c
629@@ -28,8 +28,6 @@
630  * Internal APIs
631  */
632 
633-#include <sys/cdefs.h>
634-
635 #include <assert.h>
636 #include <errno.h>
637 #include <libelf.h>
638diff --git a/libelf/libelf_ar.c b/libelf/libelf_ar.c
639index 2a8b834b..26632c86 100644
640--- a/libelf/libelf_ar.c
641+++ b/libelf/libelf_ar.c
642@@ -24,8 +24,6 @@
643  * SUCH DAMAGE.
644  */
645 
646-#include <sys/cdefs.h>
647-
648 #include <assert.h>
649 #include <ctype.h>
650 #include <libelf.h>
651diff --git a/libelf/libelf_ar_util.c b/libelf/libelf_ar_util.c
652index 601036fa..f98e7258 100644
653--- a/libelf/libelf_ar_util.c
654+++ b/libelf/libelf_ar_util.c
655@@ -24,8 +24,6 @@
656  * SUCH DAMAGE.
657  */
658 
659-#include <sys/cdefs.h>
660-
661 #include <assert.h>
662 #include <libelf.h>
663 #include <stdlib.h>
664diff --git a/libelf/libelf_checksum.c b/libelf/libelf_checksum.c
665index 84ab3370..d573bc20 100644
666--- a/libelf/libelf_checksum.c
667+++ b/libelf/libelf_checksum.c
668@@ -24,8 +24,6 @@
669  * SUCH DAMAGE.
670  */
671 
672-#include <sys/cdefs.h>
673-
674 #include <gelf.h>
675 
676 #include "_libelf.h"
677diff --git a/libelf/libelf_convert.m4 b/libelf/libelf_convert.m4
678index c9e3c28a..e9eb743b 100644
679--- a/libelf/libelf_convert.m4
680+++ b/libelf/libelf_convert.m4
681@@ -24,8 +24,6 @@
682  * SUCH DAMAGE.
683  */
684 
685-#include <sys/cdefs.h>
686-
687 #include <assert.h>
688 #include <libelf.h>
689 #include <string.h>
690diff --git a/libelf/libelf_data.c b/libelf/libelf_data.c
691index 3f921a00..6b8f50ae 100644
692--- a/libelf/libelf_data.c
693+++ b/libelf/libelf_data.c
694@@ -24,8 +24,6 @@
695  * SUCH DAMAGE.
696  */
697 
698-#include <sys/cdefs.h>
699-
700 #include <libelf.h>
701 
702 #include "_libelf.h"
703diff --git a/libelf/libelf_ehdr.c b/libelf/libelf_ehdr.c
704index 75b3dd00..813e4e17 100644
705--- a/libelf/libelf_ehdr.c
706+++ b/libelf/libelf_ehdr.c
707@@ -24,8 +24,6 @@
708  * SUCH DAMAGE.
709  */
710 
711-#include <sys/cdefs.h>
712-
713 #include <assert.h>
714 #include <gelf.h>
715 #include <libelf.h>
716diff --git a/libelf/libelf_elfmachine.c b/libelf/libelf_elfmachine.c
717index 5b8244f4..c7e44b39 100644
718--- a/libelf/libelf_elfmachine.c
719+++ b/libelf/libelf_elfmachine.c
720@@ -24,8 +24,6 @@
721  * SUCH DAMAGE.
722  */
723 
724-#include <sys/cdefs.h>
725-
726 #include <assert.h>
727 #include <libelf.h>
728 
729diff --git a/libelf/libelf_extended.c b/libelf/libelf_extended.c
730index 2ddac923..2cde9fad 100644
731--- a/libelf/libelf_extended.c
732+++ b/libelf/libelf_extended.c
733@@ -24,8 +24,6 @@
734  * SUCH DAMAGE.
735  */
736 
737-#include <sys/cdefs.h>
738-
739 #include <assert.h>
740 #include <libelf.h>
741 
742diff --git a/libelf/libelf_fsize.m4 b/libelf/libelf_fsize.m4
743index 256a856a..0192b7ed 100644
744--- a/libelf/libelf_fsize.m4
745+++ b/libelf/libelf_fsize.m4
746@@ -24,8 +24,6 @@
747  * SUCH DAMAGE.
748  */
749 
750-#include <sys/cdefs.h>
751-
752 #include <libelf.h>
753 
754 #include "_libelf.h"
755diff --git a/libelf/libelf_memory.c b/libelf/libelf_memory.c
756index 9aad49b8..e2b6bd22 100644
757--- a/libelf/libelf_memory.c
758+++ b/libelf/libelf_memory.c
759@@ -24,8 +24,6 @@
760  * SUCH DAMAGE.
761  */
762 
763-#include <sys/cdefs.h>
764-
765 #include <ar.h>
766 #include <assert.h>
767 #include <string.h>
768diff --git a/libelf/libelf_msize.m4 b/libelf/libelf_msize.m4
769index b4cc8634..b6bfb80d 100644
770--- a/libelf/libelf_msize.m4
771+++ b/libelf/libelf_msize.m4
772@@ -24,8 +24,6 @@
773  * SUCH DAMAGE.
774  */
775 
776-#include <sys/cdefs.h>
777-
778 #include <assert.h>
779 #include <libelf.h>
780 #include <string.h>
781diff --git a/libelf/libelf_open.c b/libelf/libelf_open.c
782index 7216df14..4b0cec72 100644
783--- a/libelf/libelf_open.c
784+++ b/libelf/libelf_open.c
785@@ -24,7 +24,6 @@
786  * SUCH DAMAGE.
787  */
788 
789-#include <sys/cdefs.h>
790 #include <sys/types.h>
791 #include <sys/stat.h>
792 
793diff --git a/libelf/libelf_phdr.c b/libelf/libelf_phdr.c
794index ac92679f..88cac8aa 100644
795--- a/libelf/libelf_phdr.c
796+++ b/libelf/libelf_phdr.c
797@@ -24,8 +24,6 @@
798  * SUCH DAMAGE.
799  */
800 
801-#include <sys/cdefs.h>
802-
803 #include <assert.h>
804 #include <gelf.h>
805 #include <libelf.h>
806diff --git a/libelf/libelf_shdr.c b/libelf/libelf_shdr.c
807index 463a0ed0..604a6701 100644
808--- a/libelf/libelf_shdr.c
809+++ b/libelf/libelf_shdr.c
810@@ -24,8 +24,6 @@
811  * SUCH DAMAGE.
812  */
813 
814-#include <sys/cdefs.h>
815-
816 #include <gelf.h>
817 #include <libelf.h>
818 
819diff --git a/libelf/libelf_xlate.c b/libelf/libelf_xlate.c
820index 003f9532..f8a7967c 100644
821--- a/libelf/libelf_xlate.c
822+++ b/libelf/libelf_xlate.c
823@@ -24,8 +24,6 @@
824  * SUCH DAMAGE.
825  */
826 
827-#include <sys/cdefs.h>
828-
829 #include <assert.h>
830 #include <libelf.h>
831 
832-- 
8332.31.1
834