X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-syscall-events%2Fgen-syscall-events.c;h=7f6e1860d50e05c95ac80e5a6e83b62f7116e23a;hp=5e4aabe582708f404934f3eaa25a1719689efdf7;hb=701a99d1cf638273320db3ce52cf52816129d95a;hpb=030312cfdeb643db807b028f9edffdee57384416 diff --git a/tests/utils/testapp/gen-syscall-events/gen-syscall-events.c b/tests/utils/testapp/gen-syscall-events/gen-syscall-events.c index 5e4aabe58..7f6e1860d 100644 --- a/tests/utils/testapp/gen-syscall-events/gen-syscall-events.c +++ b/tests/utils/testapp/gen-syscall-events/gen-syscall-events.c @@ -15,8 +15,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _LGPL_SOURCE - #include #include #include @@ -33,7 +31,7 @@ */ int main(int argc, char **argv) { - int fd, ret = 0; + int fd, ret; char buf[MAX_LEN]; char *start_file; @@ -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;