Skip to content

Commit

Permalink
Merge pull request #25630 from snogge/fallocate64-1.26
Browse files Browse the repository at this point in the history
BUG: Use large file fallocate on 32 bit linux platforms
  • Loading branch information
charris committed Jan 24, 2024
2 parents e48572e + f49c6f9 commit dc12cf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions numpy/core/feature_detection_stdio.h
@@ -1,6 +1,9 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <fcntl.h>

#if 0 /* Only for setup_common.py, not the C compiler */
off_t ftello(FILE *stream);
int fseeko(FILE *stream, off_t offset, int whence);
int fallocate(int, int, off_t, off_t);
#endif
5 changes: 3 additions & 2 deletions numpy/core/src/multiarray/convert.c
Expand Up @@ -23,8 +23,9 @@
#include "array_coercion.h"
#include "refcount.h"

int
fallocate(int fd, int mode, off_t offset, off_t len);
#if defined(HAVE_FALLOCATE) && defined(__linux__)
#include <fcntl.h>
#endif

/*
* allocate nbytes of diskspace for file fp
Expand Down

0 comments on commit dc12cf1

Please sign in to comment.