Re: [PATCH] Fix building kernel under Solaris

From: Christoph Hellwig
Date: Wed Mar 07 2007 - 04:42:50 EST


On Tue, Mar 06, 2007 at 10:09:40AM -0800, Deepak Saxena wrote:
> @@ -16,8 +16,10 @@
> #include <sys/time.h>
> #include <sys/ioctl.h>
> #include <sys/types.h>
> +#ifndef __sun__
> #include <asm/types.h>
> #endif
> +#endif

So if solaris doesn't need it, why do we need it on Linux?

> +/*
> + * Solaris does not strsep
> + */
> +#ifndef __sun__
> while ((fname = strsep(&sources, " ")) != NULL) {
> if (!*fname)
> continue;
> +#else
> + for (fname = strtok(sources, " "); fname; fname = strtok(NULL, " ")) {
> +#endif
> if (!parse_source_files(fname, &md))
> goto release;
> }

Please either provide a strsep for solaris, or use strtok unconditionally.
ut this ifdef mess is not acceptable.

>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/