0005-Add-missing-headers-for-open-flags.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 0dff338a704f4ad11a2b78871e1f2a0b8030b4d2 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Mon, 28 Nov 2016 23:12:37 +0100
  4. Subject: [PATCH] Add missing headers for open() flags
  5. Both pidfile.c and syslog.c use open() and its flags, but forgets to
  6. include all relevant headers, causing build failures with the musl C
  7. library.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. ---
  10. pidfile.c | 2 ++
  11. syslog.c | 2 ++
  12. 2 files changed, 4 insertions(+)
  13. diff --git a/pidfile.c b/pidfile.c
  14. index e0959a0..14de56f 100644
  15. --- a/pidfile.c
  16. +++ b/pidfile.c
  17. @@ -26,8 +26,10 @@
  18. #include <stdio.h>
  19. #include <unistd.h>
  20. +#include <sys/types.h>
  21. #include <sys/stat.h>
  22. #include <sys/file.h>
  23. +#include <fcntl.h>
  24. #include <string.h>
  25. #include <errno.h>
  26. #include <signal.h>
  27. diff --git a/syslog.c b/syslog.c
  28. index f96b43c..d09e7aa 100644
  29. --- a/syslog.c
  30. +++ b/syslog.c
  31. @@ -57,6 +57,8 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
  32. #include <sys/file.h>
  33. #include <signal.h>
  34. #include <sys/syslog.h>
  35. +#include <sys/stat.h>
  36. +#include <fcntl.h>
  37. #if 0
  38. #include "syslog.h"
  39. #include "pathnames.h"
  40. --
  41. 2.7.4