diff mbox

[OpenWrt-Devel] procd: uClibc O_PATH backwards compatibility fixes

Message ID 1470990474-24445-1-git-send-email-dedeckeh@gmail.com
State Changes Requested
Delegated to: John Crispin
Headers show

Commit Message

Hans Dedecker Aug. 12, 2016, 8:27 a.m. UTC
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
---
 inittab.c     | 4 ++++
 utils/utils.c | 4 ++++
 2 files changed, 8 insertions(+)

Comments

Karl Palsson Aug. 12, 2016, 11:49 a.m. UTC | #1
Does this actually preserve what O_PATH implies or does it just
make it compile properly when people use the O_PATH attribute?

Cheers,
Karl P


Hans Dedecker <dedeckeh@gmail.com> wrote:
> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
> ---
>  inittab.c     | 4 ++++
>  utils/utils.c | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/inittab.c b/inittab.c
> index 6dde11a..ae2c431 100644
> --- a/inittab.c
> +++ b/inittab.c
> @@ -31,6 +31,10 @@
>  #include "procd.h"
>  #include "rcS.h"
>  
> +#ifndef O_PATH
> +#define O_PATH		010000000
> +#endif
> +
>  #define TAG_ID		0
>  #define TAG_RUNLVL	1
>  #define TAG_ACTION	2
> diff --git a/utils/utils.c b/utils/utils.c
> index 8f14aad..e239eda 100644
> --- a/utils/utils.c
> +++ b/utils/utils.c
> @@ -26,6 +26,10 @@
>  
>  #include "../log.h"
>  
> +#ifndef O_PATH
> +#define O_PATH		010000000
> +#endif
> +
>  void
>  __blobmsg_list_init(struct blobmsg_list *list, int offset, int len, blobmsg_list_cmp cmp)
>  {
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
Hans Dedecker Aug. 12, 2016, 1:54 p.m. UTC | #2
On my target running kernel version 3.4 it preserves what O_PATH implies

Hans

On Fri, Aug 12, 2016 at 1:49 PM, Karl Palsson <karlp@tweak.net.au> wrote:
>
> Does this actually preserve what O_PATH implies or does it just
> make it compile properly when people use the O_PATH attribute?
>
> Cheers,
> Karl P
>
>
> Hans Dedecker <dedeckeh@gmail.com> wrote:
>> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
>> ---
>>  inittab.c     | 4 ++++
>>  utils/utils.c | 4 ++++
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/inittab.c b/inittab.c
>> index 6dde11a..ae2c431 100644
>> --- a/inittab.c
>> +++ b/inittab.c
>> @@ -31,6 +31,10 @@
>>  #include "procd.h"
>>  #include "rcS.h"
>>
>> +#ifndef O_PATH
>> +#define O_PATH               010000000
>> +#endif
>> +
>>  #define TAG_ID               0
>>  #define TAG_RUNLVL   1
>>  #define TAG_ACTION   2
>> diff --git a/utils/utils.c b/utils/utils.c
>> index 8f14aad..e239eda 100644
>> --- a/utils/utils.c
>> +++ b/utils/utils.c
>> @@ -26,6 +26,10 @@
>>
>>  #include "../log.h"
>>
>> +#ifndef O_PATH
>> +#define O_PATH               010000000
>> +#endif
>> +
>>  void
>>  __blobmsg_list_init(struct blobmsg_list *list, int offset, int len, blobmsg_list_cmp cmp)
>>  {
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
diff mbox

Patch

diff --git a/inittab.c b/inittab.c
index 6dde11a..ae2c431 100644
--- a/inittab.c
+++ b/inittab.c
@@ -31,6 +31,10 @@ 
 #include "procd.h"
 #include "rcS.h"
 
+#ifndef O_PATH
+#define O_PATH		010000000
+#endif
+
 #define TAG_ID		0
 #define TAG_RUNLVL	1
 #define TAG_ACTION	2
diff --git a/utils/utils.c b/utils/utils.c
index 8f14aad..e239eda 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -26,6 +26,10 @@ 
 
 #include "../log.h"
 
+#ifndef O_PATH
+#define O_PATH		010000000
+#endif
+
 void
 __blobmsg_list_init(struct blobmsg_list *list, int offset, int len, blobmsg_list_cmp cmp)
 {