Ack.

Thanks,
Ramesh.

On 9/1/2014 6:28 PM, Anders Widell wrote:
>   osaf/libs/core/common/include/osaf_secutil.h |  14 ++++++++++++--
>   osaf/libs/core/common/osaf_secutil.c         |   1 +
>   2 files changed, 13 insertions(+), 2 deletions(-)
>
>
> The socket credentials interface SO_PEERCRED and struct ucred are not yet
> available in the LSB compiler. Definitions of these have been added so that 
> the
> code will now compile both with an ordinary compiler as well as with an LSB
> compiler.
>
> diff --git a/osaf/libs/core/common/include/osaf_secutil.h 
> b/osaf/libs/core/common/include/osaf_secutil.h
> --- a/osaf/libs/core/common/include/osaf_secutil.h
> +++ b/osaf/libs/core/common/include/osaf_secutil.h
> @@ -19,11 +19,21 @@
>   #define OPENSAF_CORE_OSAF_SECUTIL_H_
>   
>   #define  _GNU_SOURCE
> +#include <stddef.h>
> +#include <stdbool.h>
> +#include <unistd.h>
>   #include <sys/socket.h>
>   #include <sys/un.h>
>   
> -#include <sys/types.h>
> -#include <ncsgl_defs.h>
> +/* Support for building with LSB compiler */
> +#ifndef SO_PEERCRED
> +#define SO_PEERCRED  17
> +struct ucred {
> +  pid_t pid;
> +  uid_t uid;
> +  gid_t gid;
> +};
> +#endif
>   
>   #ifdef      __cplusplus
>   extern "C" {
> diff --git a/osaf/libs/core/common/osaf_secutil.c 
> b/osaf/libs/core/common/osaf_secutil.c
> --- a/osaf/libs/core/common/osaf_secutil.c
> +++ b/osaf/libs/core/common/osaf_secutil.c
> @@ -32,6 +32,7 @@
>   
>   #define _GNU_SOURCE
>   #include <stdlib.h>
> +#include <string.h>
>   #include <errno.h>
>   #include <unistd.h>
>   #include <sys/types.h>


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to