bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (#4235)

* Fix compilation of the socket module on NetBSD 8.
* Fix the assertion failure or reading arbitrary data when parse
  a AF_BLUETOOTH address on NetBSD and DragonFly BSD.
* Fix other potential errors and make the code more reliable.
This commit is contained in:
Serhiy Storchaka 2017-11-09 18:00:38 +02:00 committed by GitHub
parent 0a2ff23fe6
commit d3187158c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 65 deletions

View file

@ -80,7 +80,10 @@ typedef int socklen_t;
#endif
#ifdef HAVE_LINUX_CAN_H
#include <linux/can.h>
# include <linux/can.h>
#else
# undef AF_CAN
# undef PF_CAN
#endif
#ifdef HAVE_LINUX_CAN_RAW_H