[PATCH 2/2] main_dd.c: Eliminate no prototype warning for swab()
Gedare Bloom
gedare at rtems.org
Mon Aug 28 14:39:25 UTC 2017
On Sun, Aug 27, 2017 at 5:02 PM, Joel Sherrill <joel at rtems.org> wrote:
> ---
> cpukit/libmisc/shell/main_dd.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/cpukit/libmisc/shell/main_dd.c b/cpukit/libmisc/shell/main_dd.c
> index e9c8bf3..6ae4abb 100644
> --- a/cpukit/libmisc/shell/main_dd.c
> +++ b/cpukit/libmisc/shell/main_dd.c
> @@ -73,6 +73,17 @@ __FBSDID("$FreeBSD: src/bin/dd/dd.c,v 1.43 2004/08/15 19:10:05 rwatson Exp $");
> #include <string.h>
> #include <unistd.h>
>
> +#ifdef __rtems__
> +/*
> + * We should be able to define _XOPEN_SOURCE=900 to get a prototype for
> + * swab() but if that is defined before including <rtems.h>, then the RTEMS
> + * headers don't compile. If defined after including <rtems.h>, then
> + * it still doesn't trip the include. Thus this prototype.
> + */
Why don't the rtems headers compile?
I don't see a patch 1/2.
> +
> +void swab(const void *from, void *to, ssize_t n);
> +#endif
> +
> #include "dd.h"
> #include "extern-dd.h"
>
> --
> 1.8.3.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list