Bug 216763 - net/haproxy: fix build with libressl-devel
Summary: net/haproxy: fix build with libressl-devel
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Sivachenko
Depends on:
Reported: 2017-02-03 21:55 UTC by Piotr Kubaj
Modified: 2017-03-28 09:02 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (demon)

patch (2.09 KB, patch)
2017-02-03 21:55 UTC, Piotr Kubaj
no flags Details | Diff
patch (2.80 KB, patch)
2017-02-04 16:37 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj 2017-02-03 21:55:33 UTC
Created attachment 179579 [details]

This patch fixes build with libressl-devel. I've also tested building with base OpenSSL 1.0.1 on FreeBSD 10.3.
Comment 1 Dmitry Sivachenko freebsd_committer 2017-02-04 06:31:24 UTC
Can you please send your patch to author? <haproxy@formilux.org>
Comment 2 Piotr Kubaj 2017-02-04 10:33:40 UTC
(In reply to Dmitry Sivachenko from comment #1)
I already did, although the version in this PR is slighly better:
Comment 3 Dmitry Sivachenko freebsd_committer 2017-02-04 12:35:49 UTC
Ah, sorry, I missed it.  Let's see which version Willy will include upstream and I can add that patch to ports so we have it before next haproxy version is rolled out.
Comment 4 Piotr Kubaj 2017-02-04 16:37:44 UTC
Created attachment 179603 [details]

Corrected to define SSL_CTX_get_tlsext_status_cb macro.
Comment 5 Piotr Kubaj 2017-03-12 17:11:34 UTC
Willy has given his opinion:

Could you now commit my patch?
Comment 6 Dmitry Sivachenko freebsd_committer 2017-03-13 10:35:13 UTC
Your patch produces a compile warning on FreeBSD-10 with base OpenSSL:

src/ssl_sock.c:801:9: warning: incompatible integer to pointer conversion
      assigning to 'void (*)(void)' from 'long' [-Wint-conversion]
        SSL_CTX_get_tlsext_status_cb(ctx, &callback);
src/ssl_sock.c:799:13: note: expanded from macro 'SSL_CTX_get_tlsext_status_cb'
  ...= SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0, (void (**)(void))cb)
     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Can this be addressed?

PS: I am not *SSL guru or fan, so given that there are a number of implementations and incompatible version around, I would prefer you to spent this energy enhancing your patch so Willy can apply it without modification (and do it faster than now providing it required a manual tweaking).
Comment 7 Dmitry Sivachenko freebsd_committer 2017-03-28 09:02:36 UTC
Port updated to version 1.7.4 with your patch included upstream.