diff mbox series

[uclibc-ng-devel] daemon.c: make _fork_parent static inline again

Message ID 20230905104410.1961114-1-jcmvbkbc@gmail.com
State Accepted
Headers show
Series [uclibc-ng-devel] daemon.c: make _fork_parent static inline again | expand

Commit Message

Max Filippov Sept. 5, 2023, 10:44 a.m. UTC
The commit cf649082c7d4 ("remove forced gcc optimization") removed -O3
optimization specified in the code for the function _fork_parent, but at
the same time it removed the 'static inline' part of the function
definition. That change seems unintended and _fork_parent is not a part
of the libc interface. Make it static inline again.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 libc/unistd/daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Waldemar Brodkorb Sept. 7, 2023, 9:43 a.m. UTC | #1
Hi,

thanks, applied and pushed,
 Waldemar

Max Filippov wrote,

> The commit cf649082c7d4 ("remove forced gcc optimization") removed -O3
> optimization specified in the code for the function _fork_parent, but at
> the same time it removed the 'static inline' part of the function
> definition. That change seems unintended and _fork_parent is not a part
> of the libc interface. Make it static inline again.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  libc/unistd/daemon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
> index 53fd902bfd72..599c3c8e6cd4 100644
> --- a/libc/unistd/daemon.c
> +++ b/libc/unistd/daemon.c
> @@ -63,7 +63,7 @@
>  /* use clone() to get fork() like behavior here -- we just want to disassociate
>   * from the controlling terminal
>   */
> -pid_t _fork_parent(void)
> +static inline pid_t _fork_parent(void)
>  {
>  	INTERNAL_SYSCALL_DECL(err);
>  	register long ret = INTERNAL_SYSCALL(clone, err, 2, CLONE_VM, 0);
> -- 
> 2.30.2
> 
> _______________________________________________
> devel mailing list -- devel@uclibc-ng.org
> To unsubscribe send an email to devel-leave@uclibc-ng.org
>
diff mbox series

Patch

diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
index 53fd902bfd72..599c3c8e6cd4 100644
--- a/libc/unistd/daemon.c
+++ b/libc/unistd/daemon.c
@@ -63,7 +63,7 @@ 
 /* use clone() to get fork() like behavior here -- we just want to disassociate
  * from the controlling terminal
  */
-pid_t _fork_parent(void)
+static inline pid_t _fork_parent(void)
 {
 	INTERNAL_SYSCALL_DECL(err);
 	register long ret = INTERNAL_SYSCALL(clone, err, 2, CLONE_VM, 0);