Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580044 - x11-base/xorg-server: fails to build: error: implicit declaration of function 'major'
Summary: x11-base/xorg-server: fails to build: error: implicit declaration of function...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 603192 (view as bug list)
Depends on:
Blocks: glibc-sysmacros
  Show dependency tree
 
Reported: 2016-04-15 07:42 UTC by jospezial
Modified: 2017-10-10 23:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix by including <sys/sysmacros.h> (xorg-server-1.18.3-Include-sys-sysmacros.h-for-major-3.patch,1.66 KB, patch)
2016-04-16 18:58 UTC, Petr Pisar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2016-04-15 07:42:39 UTC
Was reported for x11-base/xorg-server-1.18.3 in https://bugs.gentoo.org/show_bug.cgi?id=575232#c20



/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/config/udev.c: In function ‘device_added’:
/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/config/udev.c:126:49: error: implicit declaration of function ‘major’ [-Werror=implicit-function-declaration]
         if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum)))
                                                 ^
/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/config/udev.c:126:9: warning: nested extern declaration of ‘major’ [-Wnested-externs]
         if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum)))
         ^
/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/config/udev.c:126:64: error: implicit declaration of function ‘minor’ [-Werror=implicit-function-declaration]
         if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum)))
                                                                ^
/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/config/udev.c:126:9: warning: nested extern declaration of ‘minor’ [-Wnested-externs]
         if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum)))
         ^
cc1: some warnings being treated as errors
Makefile:666: recipe for target 'udev.lo' failed
make[1]: *** [udev.lo] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999_build/config'
Makefile:767: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
 * ERROR: x11-base/xorg-server-9999::x11 failed (compile phase):
 *   emake failed
Comment 1 Petr Pisar 2016-04-16 18:58:27 UTC
Created attachment 430848 [details, diff]
Fix by including <sys/sysmacros.h>
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2016-12-17 11:53:50 UTC
Fails as well on glibc-2.24. I can cook slightly more upstreamable patch by using AC_HEADER_MAJOR.
Comment 3 SpanKY gentoo-dev 2016-12-20 16:51:14 UTC
*** Bug 603192 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2016-12-28 01:35:23 UTC
thanks, i've pushed Petr's patch now:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f72578ff6ad21268181d6d860a276850a81393b1
Comment 5 Mart Raudsepp gentoo-dev 2017-10-10 22:38:24 UTC
Where is the upstream bug or patch posting for this..?
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-10 23:08:30 UTC
This upstream change should have similar effect: https://cgit.freedesktop.org/xorg/xserver/commit/?id=d732c36597fab2e9bc4f2aa72cf1110997697557
Comment 7 Mart Raudsepp gentoo-dev 2017-10-10 23:42:09 UTC
It doesn't cover config/udev.c, maybe continue in bug 633530 though