Skip to content

Commit

Permalink
update errno patches
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Dec 14, 2024
1 parent 79134fe commit aec043a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 38 deletions.
24 changes: 12 additions & 12 deletions patches/3.10/02-freebsd-errno.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/Include/Python.h b/Include/Python.h
index fb2d32d7110..5b684c7079d 100644
index d3186c32e35..55ed6a1e634 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -34,6 +34,11 @@
// version 3.13 and newer.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
# include <errno.h> // errno
+# if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN /* Operation would block */
+# endif
@@ -30,6 +30,11 @@
#include <string.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
+#if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN
+# endif
# include <stdio.h> // FILE*
# include <stdlib.h> // getenv()
# include <string.h> // memcpy()
+#endif
#endif
#include <stdlib.h>
#ifndef MS_WINDOWS
14 changes: 7 additions & 7 deletions patches/3.11/02-freebsd-errno.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/Include/Python.h b/Include/Python.h
index fb2d32d7110..5b684c7079d 100644
index 52a7aac6ba6..54fc034b90c 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -34,6 +34,11 @@
// version 3.13 and newer.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
@@ -23,6 +23,11 @@
# include <stdlib.h>
# include <stdio.h> // FILE*
# include <errno.h> // errno
+# if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN /* Operation would block */
+# define EWOULDBLOCK EAGAIN
+# endif
+# endif
# include <stdio.h> // FILE*
# include <stdlib.h> // getenv()
# include <string.h> // memcpy()
#endif
#ifndef MS_WINDOWS
14 changes: 7 additions & 7 deletions patches/3.12/02-freebsd-errno.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/Include/Python.h b/Include/Python.h
index fb2d32d7110..5b684c7079d 100644
index 52a7aac6ba6..54fc034b90c 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -34,6 +34,11 @@
// version 3.13 and newer.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
@@ -23,6 +23,11 @@
# include <stdlib.h>
# include <stdio.h> // FILE*
# include <errno.h> // errno
+# if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN /* Operation would block */
+# define EWOULDBLOCK EAGAIN
+# endif
+# endif
# include <stdio.h> // FILE*
# include <stdlib.h> // getenv()
# include <string.h> // memcpy()
#endif
#ifndef MS_WINDOWS
24 changes: 12 additions & 12 deletions patches/3.9/02-freebsd-errno.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/Include/Python.h b/Include/Python.h
index fb2d32d7110..5b684c7079d 100644
index d3186c32e35..55ed6a1e634 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -34,6 +34,11 @@
// version 3.13 and newer.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
# include <errno.h> // errno
+# if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN /* Operation would block */
+# endif
@@ -30,6 +30,11 @@
#include <string.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
+#if defined(__FreeBSD__)
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN
+# endif
# include <stdio.h> // FILE*
# include <stdlib.h> // getenv()
# include <string.h> // memcpy()
+#endif
#endif
#include <stdlib.h>
#ifndef MS_WINDOWS

0 comments on commit aec043a

Please sign in to comment.