From: Andrew Bartlett Date: Tue, 31 Jan 2017 22:55:39 +0000 (+1300) Subject: gen_ntstatus.py: Add prototype to generated py_ntstatus.c X-Git-Tag: talloc-2.1.9~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28d911aa32f9f885232fced962f63caf23e7f097;p=thirdparty%2Fsamba.git gen_ntstatus.py: Add prototype to generated py_ntstatus.c Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Reviewed-by: Garming Sam --- diff --git a/source4/scripting/bin/gen_ntstatus.py b/source4/scripting/bin/gen_ntstatus.py index 4738177aa98..b234d012151 100755 --- a/source4/scripting/bin/gen_ntstatus.py +++ b/source4/scripting/bin/gen_ntstatus.py @@ -180,6 +180,10 @@ def generatePythonFile(out_file): out_file.write("\t\treturn PyInt_FromLong(v);\n"); out_file.write("\t}\n"); out_file.write("}\n\n"); + # This is needed to avoid a missing prototype error from the C + # compiler. There is never a prototype for this function, it is a + # module loaded by python with dlopen() and found with dlsym(). + out_file.write("void initntstatus(void);\n") out_file.write("void initntstatus(void)\n") out_file.write("{\n") out_file.write("\tPyObject *m;\n\n")