[apparmor] Rev 2456: Unify escape sequence processing into a set of library fns.

Seth Arnold seth.arnold at canonical.com
Thu Apr 17 18:11:23 UTC 2014


On Thu, Apr 17, 2014 at 10:48:07AM -0700, Steve Beattie wrote:
> parser: find SIZE_MAX on older versions of glibc and g++
> 
> Another issue with commit 2456 is that with older versions of glibc and
> g++, a definition for SIZE_MAX was not being found; e.g. on Ubuntu 12.04
> LTS and 12.10, the parser fails to compile with the following error:
> 
>   g++ -g -O2 -pipe -Wall -Wsign-compare -Wmissing-field-initializers -Wformat-security -Wunused-parameter -std=gnu++0x -D_GNU_SOURCE -DPACKAGE=\"apparmor-parser\" -DLOCALEDIR=\"/usr/share/locale\" -DSUBDOMAIN_CONFDIR=\"/etc/apparmor\" -I../libraries/libapparmor//include -c -o lib.o lib.c
>   lib.c: In function 'int str_escseq(const char**, const char*)':
>   lib.c:292:32: error: 'SIZE_MAX' was not declared in this scope
> 
> The following patch addresses the issue by explicitly including the C stdint
> header which contains the definition for SIZE_MAX.
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  parser/lib.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: b/parser/lib.c
> ===================================================================
> --- a/parser/lib.c
> +++ b/parser/lib.c
> @@ -29,6 +29,8 @@
>  #include <sys/stat.h>
>  #include <sys/types.h>
>  
> +#include <cstdint>
> +
>  #include "lib.h"
>  #include "parser.h"
>  
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140417/ba72ff65/attachment.pgp>


More information about the AppArmor mailing list