From 95eef25acad42fcbdb36a12dc2cce07d85e02e71 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 8 Nov 2023 17:07:17 +0200 Subject: [PATCH] Fix for Python 3.13: explicitly include unistd.h --- src/libImaging/TiffDecode.c | 4 ++++ src/libImaging/TiffDecode.h | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libImaging/TiffDecode.c b/src/libImaging/TiffDecode.c index 35122f182..b75a32dd2 100644 --- a/src/libImaging/TiffDecode.c +++ b/src/libImaging/TiffDecode.c @@ -12,6 +12,10 @@ #include "Imaging.h" +#ifndef _UNISTD_H +#include /* lseek */ +#endif + #ifdef HAVE_LIBTIFF #ifndef uint diff --git a/src/libImaging/TiffDecode.h b/src/libImaging/TiffDecode.h index c7c7d48ed..02454ba03 100644 --- a/src/libImaging/TiffDecode.h +++ b/src/libImaging/TiffDecode.h @@ -13,12 +13,6 @@ #include #endif -/* UNDONE -- what are we using from this? */ -/*#ifndef _UNISTD_H - # include - # endif -*/ - #ifndef min #define min(x, y) ((x > y) ? y : x) #define max(x, y) ((x < y) ? y : x)