Message ID | 1460860245-14895-1-git-send-email-vapier@gentoo.org |
---|---|
State | Accepted |
Commit | aacf7cff26a1ee4cb4528f6f89569a435d9db991 |
Headers | show |
+ man-page and glibc folks On Sat, Apr 16, 2016 at 10:30:45PM -0400, Mike Frysinger wrote: > These functions have always been defined in sys/sysmacros.h under > Linux C libraries. For some, including sys/types.h implicitly > includes that as well, but glibc wants to deprecate that, and some > others already have. Include the header explicitly for the funcs. > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> Patch looks fine to me, thanks. Pushed to mtd-utils.git. But I don't see this change documented anywhere. (Helpfully, I do see the change from your other patch -- _BSD_SOURCE -> _DEFAULT_SOURCE -- documented though!) Should the man-pages project be updated? I see the latest makedev(5) still recommends #include <sys/types.h>. Brian > --- > include/common.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/common.h b/include/common.h > index fb0ca83..8cb3142 100644 > --- a/include/common.h > +++ b/include/common.h > @@ -28,6 +28,7 @@ > #include <errno.h> > #include <features.h> > #include <inttypes.h> > +#include <sys/sysmacros.h> > #include "version.h" > > #ifndef PROGRAM_NAME > -- > 2.7.4 >
On 18 Apr 2016 09:39, Brian Norris wrote: > On Sat, Apr 16, 2016 at 10:30:45PM -0400, Mike Frysinger wrote: > > These functions have always been defined in sys/sysmacros.h under > > Linux C libraries. For some, including sys/types.h implicitly > > includes that as well, but glibc wants to deprecate that, and some > > others already have. Include the header explicitly for the funcs. > > > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > > Patch looks fine to me, thanks. Pushed to mtd-utils.git. > > But I don't see this change documented anywhere. (Helpfully, I do see > the change from your other patch -- _BSD_SOURCE -> _DEFAULT_SOURCE -- > documented though!) Should the man-pages project be updated? I see the > latest makedev(5) still recommends #include <sys/types.h>. glibc hasn't moved forward (yet). we should update the man pages now though to mention sys/sysmacros.h. -mike
diff --git a/include/common.h b/include/common.h index fb0ca83..8cb3142 100644 --- a/include/common.h +++ b/include/common.h @@ -28,6 +28,7 @@ #include <errno.h> #include <features.h> #include <inttypes.h> +#include <sys/sysmacros.h> #include "version.h" #ifndef PROGRAM_NAME
These functions have always been defined in sys/sysmacros.h under Linux C libraries. For some, including sys/types.h implicitly includes that as well, but glibc wants to deprecate that, and some others already have. Include the header explicitly for the funcs. Signed-off-by: Mike Frysinger <vapier@gentoo.org> --- include/common.h | 1 + 1 file changed, 1 insertion(+)