summaryrefslogtreecommitdiff
path: root/pidl/tests/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/tests/Util.pm')
-rw-r--r--pidl/tests/Util.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/pidl/tests/Util.pm b/pidl/tests/Util.pm
index ff876ec039..4ad216a6a1 100644
--- a/pidl/tests/Util.pm
+++ b/pidl/tests/Util.pm
@@ -13,8 +13,6 @@ use strict;
use FindBin qw($RealBin);
use lib "$RealBin/../lib";
-use Parse::Pidl::Samba4 qw(is_intree);
-
use Parse::Pidl;
my $warnings = "";
undef &Parse::Pidl::warning;
@@ -68,15 +66,12 @@ sub test_samba4_ndr
SKIP: {
- my $flags;
- if (system("pkg-config --exists ndr") == 0 and !is_intree()) {
- $flags = `pkg-config --libs --cflags ndr`;
- } else {
- skip "no samba environment available, skipping compilation", 3;
- }
+ skip "no samba environment available, skipping compilation", 3
+ if (system("pkg-config --exists ndr") != 0);
my $main = "
#define uint_t unsigned int
+#define _GNU_SOURCE
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
@@ -139,6 +134,8 @@ $c
$cc = "cc";
}
+ my $flags = `pkg-config --libs --cflags ndr`;
+
my $cmd = "$cc $cflags -x c - -o $outfile $flags $ldflags";
$cmd =~ s/\n//g;
open CC, "|$cmd";