Change in flashrom[master]: meson: fix compilation under uClibc-ng

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') -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-MessageType: newchange

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? -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Mon, 20 Jul 2020 00:04:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment

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 -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Mon, 20 Jul 2020 00:06:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment

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. -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Mon, 20 Jul 2020 00:36:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment

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 -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Mon, 20 Jul 2020 08:12:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment

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. -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Mon, 20 Jul 2020 08:13:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment

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. -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 1 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Tue, 21 Jul 2020 04:54:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment

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') -- To view, visit https://review.coreboot.org/c/flashrom/+/43599 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1 Gerrit-Change-Number: 43599 Gerrit-PatchSet: 2 Gerrit-Owner: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-MessageType: merged
participants (3)
-
Angel Pons (Code Review)
-
David Hendricks (Code Review)
-
Edward O'Callaghan (Code Review)