Files
Sam James 07a1b913b1 Add newer ioctl prototype for CUSE too
Mirror the fuse-side change commit abdd45f83c
("Make ioctl prototype conditional on FUSE_USE_VERSION. (#482)")'
for cuse too.

Crank versions to 3.19 as this is an ABI change.

Also increase the default FUSE_USE_VERSION to 30 in
include/cuse_lowlevel.h, 29 was below the libfuse3
min version.

Closes: https://github.com/libfuse/libfuse/issues/1406
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2026-06-20 13:40:52 +02:00

54 lines
779 B
C

#include "fuse_config.h"
#ifdef HAVE_PTHREAD_SETNAME_NP
#define _GNU_SOURCE
#include <pthread.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <errno.h>
#ifndef FUSE_USE_VERSION
#define FUSE_USE_VERSION (FUSE_MAKE_VERSION(3, 19))
#endif
#include "util.h"
#include "fuse_log.h"
#include "fuse_lowlevel.h"
#include <stdio.h>
int libfuse_strtol(const char *str, long *res)
{
char *endptr;
int base = 10;
long val;
errno = 0;
if (!str)
return -EINVAL;
val = strtol(str, &endptr, base);
if (errno)
return -errno;
if (endptr == str || *endptr != '\0')
return -EINVAL;
*res = val;
return 0;
}
void fuse_set_thread_name(const char *name)
{
#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), name);
#else
(void)name;
#endif
}