Skip to content

Commit

Permalink
Fix missing DUPLEX_UNKNOWN on older compilers
Browse files Browse the repository at this point in the history
Signed-off-by: Amir Rossert <[email protected]>
  • Loading branch information
amirrossert committed Dec 23, 2023
1 parent 13e1fe7 commit d5faeab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ I: 2077, 2160

N: Amir Rossert
W: https://github.com/arossert
I: 2156
I: 2156, 2345

N: Lawrence D'Anna
W: https://github.com/smoofra
Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
It could either leak memory or core dump.
- 2340_, [NetBSD]: if process is terminated, `Process.cwd()`_ will return an
empty string instead of raising `NoSuchProcess`_.
- 2345_, [Linux]: fix compilation on older compiler missing DUPLEX_UNKNOWN

5.9.7
=====
Expand Down
5 changes: 5 additions & 0 deletions psutil/_psutil_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ static PyMethodDef mod_methods[] = {
{"set_debug", psutil_set_debug, METH_VARARGS},
{NULL, NULL, 0, NULL}
};
// May happen on old RedHat versions, see:
// https://github.com/giampaolo/psutil/issues/607
#ifndef DUPLEX_UNKNOWN
#define DUPLEX_UNKNOWN 0xff
#endif


#if PY_MAJOR_VERSION >= 3
Expand Down

0 comments on commit d5faeab

Please sign in to comment.