[systemd-devel] [PATCH]: define PAGE_SIZE if undefined
Cristian Rodríguez
crrodriguez at opensuse.org
Tue Mar 20 09:37:00 PDT 2012
El 20/03/12 01:26, Kelly Anderson escribió:
> Hi,
>
> PAGE_SIZE is undefined on arm/eglibc. And from what I've seen on the web
> that probably the case for other architectures as well.
> This takes care of it for me.
>
> --- ./src/journal/journald.c.orig 2012-03-19 19:21:56.000000000 -0600
> +++ ./src/journal/journald.c 2012-03-19 22:03:17.349132684 -0600
> @@ -72,6 +72,11 @@
>
> #define ENTRY_SIZE_MAX (1024*1024*32)
>
> +#ifndef PAGE_SIZE
> +/* not defined on arm/eglibc */
> +#define PAGE_SIZE 4096
> +#endif
> +
> typedef enum StdoutStreamState {
> STDOUT_STREAM_IDENTIFIER,
> STDOUT_STREAM_PRIORITY,
This is a bug... even with your fix..
application should call sysconf( _SC_PAGESIZE) instead... it should
never use the constant value.
More information about the systemd-devel
mailing list