Operational Defect Database

BugZero found this defect 2433 days ago.

MongoDB | 398200

[SERVER-29855] Pull major/minor from sys/sysmacros.h on linux

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.10

Description:

Info

Per newer versions of glibc: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev) Including <sys/sysmacros.h> appears to be the correct solution to quiet the warning

Top User Comments

xgen-internal-githook commented on Mon, 16 Oct 2017 15:33:34 +0000: Author: {'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'} Message: SERVER-29855 Pull major/minor from sys/sysmacros.h Per newer versions of glibc: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev) Including <sys/sysmacros.h> appears to be the correct solution to quiet the warning (cherry picked from commit e245cac2b3c18015dee8caddd449532785d15c2b) Branch: v3.0 https://github.com/mongodb/mongo/commit/235a680d55839e9a6750de13bfe051e9c50d0240 xgen-internal-githook commented on Mon, 2 Oct 2017 14:30:36 +0000: Author: {'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'} Message: SERVER-29855 Pull major/minor from sys/sysmacros.h Per newer versions of glibc: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev) Including <sys/sysmacros.h> appears to be the correct solution to quiet the warning (cherry picked from commit e245cac2b3c18015dee8caddd449532785d15c2b) Branch: v3.4 https://github.com/mongodb/mongo/commit/a591ea35475134f982ccc461fa966ec6ae48b634 xgen-internal-githook commented on Mon, 2 Oct 2017 14:30:02 +0000: Author: {'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'} Message: SERVER-29855 Pull major/minor from sys/sysmacros.h Per newer versions of glibc: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev) Including <sys/sysmacros.h> appears to be the correct solution to quiet the warning (cherry picked from commit e245cac2b3c18015dee8caddd449532785d15c2b) Branch: v3.2 https://github.com/mongodb/mongo/commit/65507e2a2a3fecdd726415bb05dc624d1fcaa63b acm commented on Fri, 22 Sep 2017 12:19:44 +0000: Hi hydrapolic - I've just now marked this ticket for backport to request backport to 3.2 and 3.4. We will evaluate whether to do the backport the next time we triage open backport requests. hydrapolic commented on Fri, 22 Sep 2017 10:04:05 +0000: Can you please backport to 3.2/3.4? xgen-internal-githook commented on Mon, 26 Jun 2017 17:40:41 +0000: Author: {u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'} Message: SERVER-29855 Pull major/minor from sys/sysmacros.h Per newer versions of glibc: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev) Including <sys/sysmacros.h> appears to be the correct solution to quiet the warning Branch: master https://github.com/mongodb/mongo/commit/e245cac2b3c18015dee8caddd449532785d15c2b

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...