diff --git a/defn2c.pl b/defn2c.pl
index c449de2..ef8d475 100755
--- a/defn2c.pl
+++ b/defn2c.pl
@@ -2,7 +2,7 @@
 
 use strict;
 
-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
+my $DEB_HOST_ARCH_OS = `uname -s|tr [A-Z] [a-z]`;
 
 $DEB_HOST_ARCH_OS =~ s/\n//;
 
diff --git a/defn2man.pl b/defn2man.pl
index 6ddcfdd..f1e6bde 100755
--- a/defn2man.pl
+++ b/defn2man.pl
@@ -2,7 +2,7 @@
 
 use strict;
 
-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
+my $DEB_HOST_ARCH_OS = `uname -s | tr [A-Z] [a-z]`;
 
 $DEB_HOST_ARCH_OS =~ s/\n//;
 
