David Hendricks has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
meson: fix compilation under uClibc-ng
fileno requires _POSIX_C_SOURCE to only be defined.
nanosleep requires _POSIX_C_SOURCE to be defined to 199309L.
strndup requires _POSIX_C_SOURCE to be defined to 200809L.
Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Signed-off-by: Rosen Penev rosenp@gmail.com --- M meson.build 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/99/43599/1
diff --git a/meson.build b/meson.build index 5374e87..ef7ac2c 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,7 @@ cc = meson.get_compiler('c') add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c') add_project_arguments('-D_DEFAULT_SOURCE', language : 'c') -add_project_arguments('-D_POSIX_C_SOURCE', language : 'c') # required for fileno +add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required for fileno, nanosleep, and strndup add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19 add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c')
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1:
I'm curious if others have thoughts on how to best handle feature macros. Should we make the equivalent change in the Makefile and add -D_POSIX_C_SOURCE=200809L? We can instead set it in a commonly used header like platform.h. Or we can define it as needed on a file-by-file basis, but that might be ugly.
Also, if we add it to a header we can take the logic currently in dmi.c and do this: #if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10) || __GLIBC__ < 2 #define _GNU_SOURCE #else #define _POSIX_C_SOURCE 200809L #endif
Thoughts?
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1:
BTW, this patch was originally sent via Github: https://github.com/flashrom/flashrom/pull/156
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1: Code-Review+2
Patch Set 1:
BTW, this patch was originally sent via Github: https://github.com/flashrom/flashrom/pull/156
Seems reason to me. Thanks for doing this, perhaps we should have a README.md that is picked up by Github with instructions to redirect developers, the wiki instructions are not very friendly.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+2
Patch Set 1:
BTW, this patch was originally sent via Github: https://github.com/flashrom/flashrom/pull/156
Seems reason to me. Thanks for doing this, perhaps we should have a README.md that is picked up by Github with instructions to redirect developers, the wiki instructions are not very friendly.
To make people use Gerrit instead of pull requests? Sounds good.
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+2
Patch Set 1:
BTW, this patch was originally sent via Github: https://github.com/flashrom/flashrom/pull/156
Seems reason to me. Thanks for doing this, perhaps we should have a README.md that is picked up by Github with instructions to redirect developers, the wiki instructions are not very friendly.
Github already picks up the README, though maybe if we have a README.md Github will pick it up? Either way I definitely agree that we should make the upstream process more obviuous.
It would be nice if people used Gerrit more often, but it's also non-trivial and a lot of developers are already using Github. Automating some aspects of pull request review with linters and CI ought to make porting much quicker/easier.
David Hendricks has submitted this change. ( https://review.coreboot.org/c/flashrom/+/43599 )
Change subject: meson: fix compilation under uClibc-ng ......................................................................
meson: fix compilation under uClibc-ng
fileno requires _POSIX_C_SOURCE to only be defined.
nanosleep requires _POSIX_C_SOURCE to be defined to 199309L.
strndup requires _POSIX_C_SOURCE to be defined to 200809L.
Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Signed-off-by: Rosen Penev rosenp@gmail.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/43599 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Edward O'Callaghan quasisec@chromium.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M meson.build 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved
diff --git a/meson.build b/meson.build index 5374e87..ef7ac2c 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,7 @@ cc = meson.get_compiler('c') add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c') add_project_arguments('-D_DEFAULT_SOURCE', language : 'c') -add_project_arguments('-D_POSIX_C_SOURCE', language : 'c') # required for fileno +add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required for fileno, nanosleep, and strndup add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19 add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c')