Git Product home page Git Product logo

Comments (11)

kaniini avatar kaniini commented on July 17, 2024 1

I think trying to be POSIX-compliant on something that is requiring AF_NETLINK is a little crazy. If somebody wants to use this on non-Linux, they have to support AF_NETLINK anyway, so adding asprintf is not unreasonable to do at the same time.

from eudev.

lu-zero avatar lu-zero commented on July 17, 2024

uclibc and musl support both

from eudev.

blueness avatar blueness commented on July 17, 2024

Yeah I'm not sure how much of an idealist I am here. We can leave this open as a reminder, but asprintf is pretty meat and potatoes these days. Its not in posix and I don't know about the BSD world, but the latter doesn't concern us since eudev is Linux specific.

from eudev.

blueness avatar blueness commented on July 17, 2024

Oops, wrong button!

from eudev.

c9s avatar c9s commented on July 17, 2024

clang -D_BSD_SOURCE=1 might solve this problem.

from eudev.

clausecker avatar clausecker commented on July 17, 2024

You could consider providing your own asprintf implementation to stay compatible with the standard.

from eudev.

ericonr avatar ericonr commented on July 17, 2024

Is this still a concern? I don't see those warnings while compiling.

Adding #define _GNU_SOURCE is reasonable, though, since variadic functions with implicit declarations can lead to weird issues.

from eudev.

blueness avatar blueness commented on July 17, 2024

@ericonr Did you compile on musl? Its not an issue on glibc, but I recall that it was an issue on musl.

from eudev.

ericonr avatar ericonr commented on July 17, 2024

Yes, on musl.

That said, I can't find out where, if anywhere, _GNU_SOURCE is being passed to it... Or if we're just getting lucky with defaults. I will see if I can come up with a clean fix to be sure the issue never happens.

from eudev.

slicer69 avatar slicer69 commented on July 17, 2024

I recently explored this idea with another project. While asprintf() may not be part of POSIX, it really is virtually everywhere - muslc, glibc, FreeBSD, and NetBSD Not sure, but it might even be available through MINIX.

from eudev.

ericonr avatar ericonr commented on July 17, 2024

The makefiles for files that use this function include this snippet, and config.h defines _GNU_SOURCE

	-include $(top_builddir)/config.h

So I think this can be closed (even if it's an ugly solution).

from eudev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.