Message ID | 51d7bd5e067978ea5340ee408a7329e8b921b372.camel@flyn.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | python/audit2allow: add #include <limits.h> to sepolgen-ifgen-attr-helper.c | expand |
On Thu, Jul 16, 2020 at 10:39 PM W. Michael Petullo <mike@flyn.org> wrote: > > I found that building on OpenWrt/musl failed with: > > sepolgen-ifgen-attr-helper.c:152:16: error: 'PATH_MAX' undeclared ... > > Musl is less "generous" than glibc in recursively including header > files, and I suspect this is the reason for this error. Explicitly > including limits.h fixes the problem. > > Signed-off-by: W. Michael Petullo <mike@flyn.org> > --- > python/audit2allow/sepolgen-ifgen-attr-helper.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/python/audit2allow/sepolgen-ifgen-attr-helper.c > b/python/audit2allow/sepolgen-ifgen-attr-helper.c > index 53f20818..f010c958 100644 > --- a/python/audit2allow/sepolgen-ifgen-attr-helper.c > +++ b/python/audit2allow/sepolgen-ifgen-attr-helper.c > @@ -28,6 +28,7 @@ > > #include <selinux/selinux.h> > > +#include <limits.h> > #include <stdio.h> > #include <sys/types.h> > #include <sys/stat.h> > -- > 2.26.2 Looks good to me. Nevertheless I had some trouble applying your patch using "git am" because your message contained "b/python/audit2allow/sepolgen-ifgen-attr-helper.c" on a new line. Did you use "git send-email" or something similar, to send your patch? Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org> If nobody complains, I will apply this patch tomorrow. Thanks, Nicolas
On Sun, Jul 19, 2020 at 6:43 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote: > > On Thu, Jul 16, 2020 at 10:39 PM W. Michael Petullo <mike@flyn.org> wrote: > > > > I found that building on OpenWrt/musl failed with: > > > > sepolgen-ifgen-attr-helper.c:152:16: error: 'PATH_MAX' undeclared ... > > > > Musl is less "generous" than glibc in recursively including header > > files, and I suspect this is the reason for this error. Explicitly > > including limits.h fixes the problem. > > > > Signed-off-by: W. Michael Petullo <mike@flyn.org> > > --- > > python/audit2allow/sepolgen-ifgen-attr-helper.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/python/audit2allow/sepolgen-ifgen-attr-helper.c > > b/python/audit2allow/sepolgen-ifgen-attr-helper.c > > index 53f20818..f010c958 100644 > > --- a/python/audit2allow/sepolgen-ifgen-attr-helper.c > > +++ b/python/audit2allow/sepolgen-ifgen-attr-helper.c > > @@ -28,6 +28,7 @@ > > > > #include <selinux/selinux.h> > > > > +#include <limits.h> > > #include <stdio.h> > > #include <sys/types.h> > > #include <sys/stat.h> > > -- > > 2.26.2 > > Looks good to me. Nevertheless I had some trouble applying your patch > using "git am" because your message contained > "b/python/audit2allow/sepolgen-ifgen-attr-helper.c" on a new line. Did > you use "git send-email" or something similar, to send your patch? > > Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org> > > If nobody complains, I will apply this patch tomorrow. Applied. Thanks, Nicolas
diff --git a/python/audit2allow/sepolgen-ifgen-attr-helper.c b/python/audit2allow/sepolgen-ifgen-attr-helper.c index 53f20818..f010c958 100644 --- a/python/audit2allow/sepolgen-ifgen-attr-helper.c +++ b/python/audit2allow/sepolgen-ifgen-attr-helper.c @@ -28,6 +28,7 @@ #include <selinux/selinux.h> +#include <limits.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h>
I found that building on OpenWrt/musl failed with: sepolgen-ifgen-attr-helper.c:152:16: error: 'PATH_MAX' undeclared ... Musl is less "generous" than glibc in recursively including header files, and I suspect this is the reason for this error. Explicitly including limits.h fixes the problem. Signed-off-by: W. Michael Petullo <mike@flyn.org> --- python/audit2allow/sepolgen-ifgen-attr-helper.c | 1 + 1 file changed, 1 insertion(+)