{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/pyopenssl/issues/595","repository_url":"https://api.github.com/repos/pyca/pyopenssl","labels_url":"https://api.github.com/repos/pyca/pyopenssl/issues/595/labels{/name}","comments_url":"https://api.github.com/repos/pyca/pyopenssl/issues/595/comments","events_url":"https://api.github.com/repos/pyca/pyopenssl/issues/595/events","html_url":"https://github.com/pyca/pyopenssl/issues/595","id":203803746,"number":595,"title":"tests/memdbg.py: NetBSD support","user":{"login":"0-wiz-0","id":2221844,"avatar_url":"https://avatars1.githubusercontent.com/u/2221844?v=3","gravatar_id":"","url":"https://api.github.com/users/0-wiz-0","html_url":"https://github.com/0-wiz-0","followers_url":"https://api.github.com/users/0-wiz-0/followers","following_url":"https://api.github.com/users/0-wiz-0/following{/other_user}","gists_url":"https://api.github.com/users/0-wiz-0/gists{/gist_id}","starred_url":"https://api.github.com/users/0-wiz-0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-wiz-0/subscriptions","organizations_url":"https://api.github.com/users/0-wiz-0/orgs","repos_url":"https://api.github.com/users/0-wiz-0/repos","events_url":"https://api.github.com/users/0-wiz-0/events{/privacy}","received_events_url":"https://api.github.com/users/0-wiz-0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-28T12:00:24Z","updated_at":"2017-05-09T16:50:03Z","closed_at":null,"body":"NetBSD does provide the `backtrace` set of functions, but they are in `libexecinfo` and have slightly different API.\r\nHere's a patch that makes a test run not complain about the missing `backtrace` function.\r\n````\r\n--- tests/memdbg.py.orig        2016-02-15 10:25:58.000000000 +0000\r\n+++ tests/memdbg.py\r\n@@ -18,16 +18,16 @@ _ffi.cdef(\r\n \r\n     int  CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *));\r\n \r\n-    int backtrace(void **buffer, int size);\r\n-    char **backtrace_symbols(void *const *buffer, int size);\r\n-    void backtrace_symbols_fd(void *const *buffer, int size, int fd);\r\n+    size_t backtrace(void **buffer, size_t size);\r\n+    char **backtrace_symbols(void *const *buffer, size_t size);\r\n+    void backtrace_symbols_fd(void *const *buffer, size_t size, int fd);\r\n     \"\"\")  # noqa\r\n _api = _ffi.verify(\r\n     \"\"\"\r\n     #include <openssl/crypto.h>\r\n     #include <stdlib.h>\r\n     #include <execinfo.h>\r\n-    \"\"\", libraries=[\"crypto\"])\r\n+    \"\"\", libraries=[\"crypto\", \"execinfo\"])\r\n C = _ffi.dlopen(None)\r\n \r\n verbose = False\r\n````\r\n\r\nHowever, I'm not sure how to make that patch cross-platform. Any suggestions?"},"comment":{"url":"https://api.github.com/repos/pyca/pyopenssl/issues/comments/300228700","html_url":"https://github.com/pyca/pyopenssl/issues/595#issuecomment-300228700","issue_url":"https://api.github.com/repos/pyca/pyopenssl/issues/595","id":300228700,"user":{"login":"moubctez","id":12608048,"avatar_url":"https://avatars0.githubusercontent.com/u/12608048?v=3","gravatar_id":"","url":"https://api.github.com/users/moubctez","html_url":"https://github.com/moubctez","followers_url":"https://api.github.com/users/moubctez/followers","following_url":"https://api.github.com/users/moubctez/following{/other_user}","gists_url":"https://api.github.com/users/moubctez/gists{/gist_id}","starred_url":"https://api.github.com/users/moubctez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moubctez/subscriptions","organizations_url":"https://api.github.com/users/moubctez/orgs","repos_url":"https://api.github.com/users/moubctez/repos","events_url":"https://api.github.com/users/moubctez/events{/privacy}","received_events_url":"https://api.github.com/users/moubctez/received_events","type":"User","site_admin":false},"created_at":"2017-05-09T16:50:03Z","updated_at":"2017-05-09T16:50:03Z","body":"Slightly change the patch:\r\n```\r\nlibraries=[\"crypto\", \"execinfo\"] if sys.platform.startswith('netbsd') else [\"crypto\"]\r\n```"}}
{"actor":{"display_login":"moubctez"}}