Message ID | 1436377303-28355-1-git-send-email-alan.coopersmith@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 8 July 2015 at 18:41, Alan Coopersmith <alan.coopersmith@oracle.com> wrote: > Linux seems to pick these up via another header, but Solaris needs them > explictly included, or we get undefined symbol errors for major & minor. > > v2: use headers documented in makedev(3C) man page instead of sysmacros.h > > Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> > --- > libkms/linux.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libkms/linux.c b/libkms/linux.c > index 4d47148..53e03c3 100644 > --- a/libkms/linux.c > +++ b/libkms/linux.c > @@ -40,6 +40,8 @@ > #include <string.h> > #include <unistd.h> > #include <sys/stat.h> > +#include <sys/types.h> > +#include <sys/mkdev.h> I'll add the HAVE_SYS_MKDEV_H guard around the latter, and push this in the next few days. Unless someone objects that is ;-) Thank you Alan, Emil
On 07/ 8/15 10:59 AM, Emil Velikov wrote: > On 8 July 2015 at 18:41, Alan Coopersmith <alan.coopersmith@oracle.com> wrote: >> Linux seems to pick these up via another header, but Solaris needs them >> explictly included, or we get undefined symbol errors for major & minor. >> >> v2: use headers documented in makedev(3C) man page instead of sysmacros.h >> >> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> >> --- >> libkms/linux.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/libkms/linux.c b/libkms/linux.c >> index 4d47148..53e03c3 100644 >> --- a/libkms/linux.c >> +++ b/libkms/linux.c >> @@ -40,6 +40,8 @@ >> #include <string.h> >> #include <unistd.h> >> #include <sys/stat.h> >> +#include <sys/types.h> >> +#include <sys/mkdev.h> > I'll add the HAVE_SYS_MKDEV_H guard around the latter, and push this > in the next few days. Unless someone objects that is ;-) Oh, whoops, I forgot to check if there was a guard needed - that sounds great to me, thanks.
diff --git a/libkms/linux.c b/libkms/linux.c index 4d47148..53e03c3 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -40,6 +40,8 @@ #include <string.h> #include <unistd.h> #include <sys/stat.h> +#include <sys/types.h> +#include <sys/mkdev.h> #include "libdrm_macros.h" #include "internal.h"
Linux seems to pick these up via another header, but Solaris needs them explictly included, or we get undefined symbol errors for major & minor. v2: use headers documented in makedev(3C) man page instead of sysmacros.h Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- libkms/linux.c | 2 ++ 1 file changed, 2 insertions(+)