This is an automated email from the ASF dual-hosted git repository.

tmedicci pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit aa3eeaa62a407e88f769ae4cc6d85c4a1b6d3568
Author: Petro Karashchenko <[email protected]>
AuthorDate: Tue Aug 8 01:42:04 2023 +0300

    libs/libc: use _SCHED_GETPID in getpgrp implementation
    
    Signed-off-by: Petro Karashchenko <[email protected]>
---
 libs/libc/unistd/lib_getpgrp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libs/libc/unistd/lib_getpgrp.c b/libs/libc/unistd/lib_getpgrp.c
index 2fb8d8c7d3..fbc7ecc459 100644
--- a/libs/libc/unistd/lib_getpgrp.c
+++ b/libs/libc/unistd/lib_getpgrp.c
@@ -24,6 +24,8 @@
 
 #include <unistd.h>
 
+#include <nuttx/sched.h>
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -44,5 +46,5 @@
 
 pid_t getpgrp(void)
 {
-  return getpid();
+  return _SCHED_GETPID();
 }

Reply via email to