All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] android: Fix header include
@ 2014-08-20 13:06 Andrei Emeltchenko
  2014-08-22  8:20 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2014-08-20 13:06 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Since Android KitKat we can use sys/prctl.h and sys/capability.h
as specified in the manual page. Fixes also build warnings:
...
warning: implicit declaration of function 'prctl'
[-Wimplicit-function-declaration]
  if (prctl(PR_SET_KEEPCAPS, 1) < 0) {
  ^
...
---
 android/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/android/main.c b/android/main.c
index 0a0c150..5299789 100644
--- a/android/main.c
+++ b/android/main.c
@@ -36,10 +36,8 @@
 #include <unistd.h>
 
 #include <sys/signalfd.h>
-#if defined(ANDROID)
+#include <sys/prctl.h>
 #include <sys/capability.h>
-#include <linux/prctl.h>
-#endif
 
 #include <glib.h>
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] android: Fix header include
  2014-08-20 13:06 [PATCH] android: Fix header include Andrei Emeltchenko
@ 2014-08-22  8:20 ` Szymon Janc
  0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2014-08-22  8:20 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Wednesday 20 of August 2014 16:06:47 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> Since Android KitKat we can use sys/prctl.h and sys/capability.h
> as specified in the manual page. Fixes also build warnings:
> ...
> warning: implicit declaration of function 'prctl'
> [-Wimplicit-function-declaration]
>   if (prctl(PR_SET_KEEPCAPS, 1) < 0) {
>   ^
> ...
> ---
>  android/main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/android/main.c b/android/main.c
> index 0a0c150..5299789 100644
> --- a/android/main.c
> +++ b/android/main.c
> @@ -36,10 +36,8 @@
>  #include <unistd.h>
>  
>  #include <sys/signalfd.h>
> -#if defined(ANDROID)
> +#include <sys/prctl.h>
>  #include <sys/capability.h>
> -#include <linux/prctl.h>
> -#endif
>  
>  #include <glib.h>
>  
> 

Applied. Thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-22  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 13:06 [PATCH] android: Fix header include Andrei Emeltchenko
2014-08-22  8:20 ` Szymon Janc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.