Tests: Fix: arm64 use sys_openat instead of sys_open
[lttng-tools.git] / tests / utils / testapp / gen-syscall-events / gen-syscall-events.c
index 9d025073577013a7232b11b90e52a7f452a14dad..7f6e1860d50e05c95ac80e5a6e83b62f7116e23a 100644 (file)
@@ -15,8 +15,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#define _LGPL_SOURCE
-
 #include <fcntl.h>
 #include <stdio.h>
 #include <sys/syscall.h>
@@ -59,7 +57,7 @@ int main(int argc, char **argv)
         * Start generating syscalls. We use syscall(2) to prevent libc to change
         * the underlying syscall. e.g. calling openat(2) instead of open(2).
         */
-       fd = syscall(SYS_open, "/proc/cpuinfo", O_RDONLY);
+       fd = syscall(SYS_openat, AT_FDCWD, "/proc/cpuinfo", O_RDONLY);
        if (fd < 0) {
                perror("open");
                ret = -1;
This page took 0.023771 seconds and 4 git commands to generate.