[PATCH] Fix the 32-bit build

Jeremy Allison jra at samba.org
Wed Sep 20 18:40:00 UTC 2017


On Wed, Sep 20, 2017 at 02:17:04AM +0200, Volker Lendecke via samba-technical wrote:
> Hi!
> 
> Review appreciated!

Fails with:

../testsuite/unittests/rpc_test_dummy_module.c:13:8: error: implicit declaration of function ‘getpid’

It still needs unistd.h I think.

> -- 
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de

> From 6330b7a53ac5b37ae6ce850ef37858205acd4cca Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 20 Sep 2017 00:12:33 +0000
> Subject: [PATCH] testsuite: Fix the 32-bit test build
> 
> samba_init_module returns 32-bit. For some reason on my
> 32-bit lxc "return 0" was converted to something but
> NT_STATUS_OK, making initialization fail.
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  testsuite/unittests/rpc_test_dummy_module.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/testsuite/unittests/rpc_test_dummy_module.c b/testsuite/unittests/rpc_test_dummy_module.c
> index d067b6e2d2b..8b30057a824 100644
> --- a/testsuite/unittests/rpc_test_dummy_module.c
> +++ b/testsuite/unittests/rpc_test_dummy_module.c
> @@ -1,10 +1,8 @@
> -#include <stdio.h>
> -#include <stdlib.h>
> -#include <signal.h>
> -#include <unistd.h>
> +#include "replace.h"
> +#include "libcli/util/ntstatus.h"
>  
> -int samba_init_module(void);
> -int samba_init_module(void)
> +NTSTATUS samba_init_module(void);
> +NTSTATUS samba_init_module(void)
>  {
>  	int rc;
>  
> @@ -16,5 +14,5 @@ int samba_init_module(void)
>  		exit(-1);
>  	}
>  
> -	return 0;
> +	return NT_STATUS_OK;
>  }
> -- 
> 2.14.1
> 




More information about the samba-technical mailing list