Skip to content

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