diff mbox series

installer: Add missing wait.h include

Message ID 20180307165544.5413-1-christian.storm@siemens.com
State Accepted
Headers show
Series installer: Add missing wait.h include | expand

Commit Message

Storm, Christian March 7, 2018, 4:55 p.m. UTC
WIFEXITED and WEXITSTATUS are missing.

Signed-off-by: Thomas Zander <thomas.zander@siemens.com>
Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 corelib/installer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic March 7, 2018, 5:08 p.m. UTC | #1
Hi Christian,

On 07/03/2018 17:55, Christian Storm wrote:
> WIFEXITED and WEXITSTATUS are missing.
> 
> Signed-off-by: Thomas Zander <thomas.zander@siemens.com>
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>  corelib/installer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/corelib/installer.c b/corelib/installer.c
> index 811723c..ec6f180 100644
> --- a/corelib/installer.c
> +++ b/corelib/installer.c
> @@ -16,6 +16,7 @@
>  #include <errno.h>
>  #include <ctype.h>
>  #include <sys/types.h>
> +#include <sys/wait.h>
>  #include <fcntl.h>
>  #include <sys/stat.h>
>  #include <sys/mount.h>
> 

I do not see any errors or warning in build. When does it happen ?

Best regards,
Stefano Babic
Storm, Christian March 13, 2018, 7:31 a.m. UTC | #2
Hi Stefano,

> On 07/03/2018 17:55, Christian Storm wrote:
> > WIFEXITED and WEXITSTATUS are missing.
> > 
> > Signed-off-by: Thomas Zander <thomas.zander@siemens.com>
> > Signed-off-by: Christian Storm <christian.storm@siemens.com>
> > ---
> >  corelib/installer.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/corelib/installer.c b/corelib/installer.c
> > index 811723c..ec6f180 100644
> > --- a/corelib/installer.c
> > +++ b/corelib/installer.c
> > @@ -16,6 +16,7 @@
> >  #include <errno.h>
> >  #include <ctype.h>
> >  #include <sys/types.h>
> > +#include <sys/wait.h>
> >  #include <fcntl.h>
> >  #include <sys/stat.h>
> >  #include <sys/mount.h>
> > 
> 
> I do not see any errors or warning in build. When does it happen ?

True. We're (slowly) trying to "port" SWUpdate to FreeBSD and using it's
compiler toolchain, the error pops up.
That said, there are at least two other places left to make "portable"
(mounting and process supervision) and then SWUpdate is ready to run on
FreeBSD (with a limited feature set, e.g., systemd, mtd, and other
Linux-specifics are of course missing but nonetheless it does run).


Kind regards,
   Christian
Stefano Babic March 13, 2018, 8:35 a.m. UTC | #3
Hi Christian,
Hi Christian,

On 13/03/2018 08:31, Christian Storm wrote:
> Hi Stefano,
> 
>> On 07/03/2018 17:55, Christian Storm wrote:
>>> WIFEXITED and WEXITSTATUS are missing.
>>>
>>> Signed-off-by: Thomas Zander <thomas.zander@siemens.com>
>>> Signed-off-by: Christian Storm <christian.storm@siemens.com>
>>> ---
>>>  corelib/installer.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/corelib/installer.c b/corelib/installer.c
>>> index 811723c..ec6f180 100644
>>> --- a/corelib/installer.c
>>> +++ b/corelib/installer.c
>>> @@ -16,6 +16,7 @@
>>>  #include <errno.h>
>>>  #include <ctype.h>
>>>  #include <sys/types.h>
>>> +#include <sys/wait.h>
>>>  #include <fcntl.h>
>>>  #include <sys/stat.h>
>>>  #include <sys/mount.h>
>>>
>>
>> I do not see any errors or warning in build. When does it happen ?
> 
> True. We're (slowly) trying to "port" SWUpdate to FreeBSD and using it's
> compiler toolchain, the error pops up.

Great ! Ok, got it.

> That said, there are at least two other places left to make "portable"
> (mounting and process supervision) and then SWUpdate is ready to run on
> FreeBSD (with a limited feature set, e.g., systemd, mtd, and other
> Linux-specifics are of course missing but nonetheless it does run).

Very nice. I have supposed to port SWUpdate to other OSes, too, but I
have really thought to uClinux for microcontrollers without MMU. Anyway,
I have not yet any projects in this direction. It is nice to know that
SWUpdate can be used even where I have not imagined.

Patch go in, thanks !

Best regards,
Stefano
diff mbox series

Patch

diff --git a/corelib/installer.c b/corelib/installer.c
index 811723c..ec6f180 100644
--- a/corelib/installer.c
+++ b/corelib/installer.c
@@ -16,6 +16,7 @@ 
 #include <errno.h>
 #include <ctype.h>
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/mount.h>