diff options
Diffstat (limited to 'rpmtools.xs')
-rw-r--r-- | rpmtools.xs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rpmtools.xs b/rpmtools.xs index 4aeebd1..c270994 100644 --- a/rpmtools.xs +++ b/rpmtools.xs @@ -2,6 +2,7 @@ #include "perl.h" #include "XSUB.h" +#include <sys/utsname.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -290,6 +291,14 @@ void callback_empty(void) {} MODULE = rpmtools PACKAGE = rpmtools +char * +arch() + CODE: + struct utsname u; + if (uname(&u) == 0) RETVAL = u.machine; else RETVAL = NULL; + OUTPUT: + RETVAL + void* db_open(prefix) char *prefix |