forkfd: fix compilation in C mode without precompiled headers
Missing one "struct" and one #include <sys/wait.h> for struct rusage. Change-Id: Iec9c051acd73484c8d94fffd15b9a1274703afca Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
2cddaf0071
commit
5e74d0e80c
4
src/3rdparty/forkfd/forkfd.c
vendored
4
src/3rdparty/forkfd/forkfd.c
vendored
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 Intel Corporation.
|
** Copyright (C) 2019 Intel Corporation.
|
||||||
** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
@ -843,7 +843,7 @@ out:
|
|||||||
#endif // _POSIX_SPAWN && !FORKFD_NO_SPAWNFD
|
#endif // _POSIX_SPAWN && !FORKFD_NO_SPAWNFD
|
||||||
|
|
||||||
|
|
||||||
int forkfd_wait(int ffd, forkfd_info *info, struct rusage *rusage)
|
int forkfd_wait(int ffd, struct forkfd_info *info, struct rusage *rusage)
|
||||||
{
|
{
|
||||||
struct pipe_payload payload;
|
struct pipe_payload payload;
|
||||||
int ret;
|
int ret;
|
||||||
|
5
src/3rdparty/forkfd/forkfd.h
vendored
5
src/3rdparty/forkfd/forkfd.h
vendored
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 Intel Corporation.
|
** Copyright (C) 2019 Intel Corporation.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
** of this software and associated documentation files (the "Software"), to deal
|
** of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <unistd.h> // to get the POSIX flags
|
#include <unistd.h> // to get the POSIX flags
|
||||||
|
|
||||||
#if _POSIX_SPAWN > 0
|
#if _POSIX_SPAWN > 0
|
||||||
@ -48,7 +49,7 @@ struct forkfd_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int forkfd(int flags, pid_t *ppid);
|
int forkfd(int flags, pid_t *ppid);
|
||||||
int forkfd_wait(int ffd, forkfd_info *info, struct rusage *rusage);
|
int forkfd_wait(int ffd, struct forkfd_info *info, struct rusage *rusage);
|
||||||
int forkfd_close(int ffd);
|
int forkfd_close(int ffd);
|
||||||
|
|
||||||
#if _POSIX_SPAWN > 0
|
#if _POSIX_SPAWN > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user