From 4ab39e0a85a0fa9ddab6a179040b24dbfabd87ad Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 6 Jul 2022 16:42:28 +0200 Subject: [PATCH] RTEMS: Declare ioctl() also if _KERNEL is defined This fixes the following warning in libbsd: rtems/blkdev.h:200:10: warning: implicit declaration of function 'ioctl'; did you mean 'ifioctl'? [-Wimplicit-function-declaration] Remove unnecessary includes. --- newlib/libc/sys/rtems/include/sys/ioccom.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h index 2a8416c41..1044a27e9 100644 --- a/newlib/libc/sys/rtems/include/sys/ioccom.h +++ b/newlib/libc/sys/rtems/include/sys/ioccom.h @@ -36,7 +36,6 @@ #define _SYS_IOCCOM_H_ #include -#include typedef unsigned long ioctl_command_t; @@ -80,14 +79,10 @@ typedef unsigned long ioctl_command_t; #define IOCPARM_IVAL(x) ((int)(intptr_t)(void *)*(caddr_t *)(void *)(x)) #endif -#else - -#include +#endif __BEGIN_DECLS int ioctl(int, ioctl_command_t, ...); __END_DECLS -#endif - #endif /* !_SYS_IOCCOM_H_ */