<commit_before>#include <fcntl.h>
#include <unistd.h>
#include <stdarg.h>
#include "syscall.h"
#include "libc.h"

int fcntl(int fd, int cmd, ...)
{
	long arg;
	va_list ap;
	va_start(ap, cmd);
	arg = va_arg(ap, long);
	va_end(ap);
	if (cmd == F_SETFL) arg |= O_LARGEFILE;
	if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, arg);
	return syscall(SYS_fcntl, fd, cmd, arg);
}

LFS64(fcntl);<commit_msg>fix F_GETOWN return value handling<commit_after>#include <fcntl.h>
#include <unistd.h>
#include <stdarg.h>
#include "syscall.h"
#include "libc.h"

int fcntl(int fd, int cmd, ...)
{
	long arg;
	va_list ap;
	va_start(ap, cmd);
	arg = va_arg(ap, long);
	va_end(ap);
	if (cmd == F_SETFL) arg |= O_LARGEFILE;
	if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, arg);
	if (cmd == F_GETOWN) return __syscall(SYS_fcntl, fd, cmd, arg);
	return syscall(SYS_fcntl, fd, cmd, arg);
}

LFS64(fcntl);
{'fraction_non_alphanumeric': 0.1711111111111111, 'fraction_numerical': 0.0044444444444444444, 'mean_word_length': 4.966887417218543, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6566702', 'n_tokens_mistral': 435, 'n_tokens_neox': 412, 'n_words': 99}