Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] fix some build breaks on Ubuntu 18.04 #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leeminghao
Copy link
Contributor

Signed-off-by: liminghao liminghao@xiaomi.com

Signed-off-by: liminghao <liminghao@xiaomi.com>
N/A

Signed-off-by: liminghao <liminghao@xiaomi.com>
@KKomarov
Copy link

add #include <sys/sysmacros.h> to qga/commands-posix.c to fix major minor error

@leeminghao
Copy link
Contributor Author

add #include <sys/sysmacros.h> to qga/commands-posix.c to fix major minor error

I don't know how to understand this tip

@KKomarov
Copy link

KKomarov commented Oct 22, 2019

I've tried to compile on latest debian, it has new libc with breaking change:

  • The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated.
    This means that in a future release, the macros “major”, “minor”, and
    “makedev” will only be available from <sys/sysmacros.h>.

    These macros are not part of POSIX nor XSI, and their names frequently
    collide with user code; see for instance glibc bug 19239 and Red Hat
    bug 130601. <stdlib.h> includes <sys/types.h> under _GNU_SOURCE, and
    C++ code presently cannot avoid being compiled under _GNU_SOURCE,
    exacerbating the problem.

During compile I got Identifier not found. To fix it just add add #include <sys/sysmacros.h> to qga/commands-posix.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants