Bug 223384 - security/opensc: compile fails with SM option unset
Summary: security/opensc: compile fails with SM option unset
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: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 18:15 UTC by Martin Birgmeier
Modified: 2017-11-03 08:39 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2017-11-02 18:15:46 UTC
If (as seems to have been the default in previous versions of the port) the SM option is unset, the compile fails.

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH=\"/usr/local/etc/opensc.conf\" -I../../src -I/usr/include -I/usr/local/include/PCSC -D_THREAD_SAFE -pthread -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Werror=declaration-after-statement -MT libopensc_la-card-authentic.lo -MD -MP -MF .deps/libopensc_la-card-authentic.Tpo -c card-authentic.c -o libopensc_la-card-authentic.o >/dev/null 2>&1
card-sc-hsm.c:287:2: warning: implicit declaration of function 'sc_sm_stop' is
      invalid in C99 [-Wimplicit-function-declaration]
        sc_sm_stop(card);
        ^
card-sc-hsm.c:566:13: error: no member named 'sm_ctx' in 'struct sc_card'
                        && card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) {
                           ~~~~  ^
card-sc-hsm.c:566:31: error: use of undeclared identifier 'SM_MODE_TRANSMIT'
                        && card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) {
                                                   ^
card-sc-hsm.c:608:15: error: no member named 'sm_ctx' in 'struct sc_card'
                                && (card->sm_ctx.sm_mode == SM_MODE_TRANSMIT)) {
                                    ~~~~  ^
card-sc-hsm.c:608:33: error: use of undeclared identifier 'SM_MODE_TRANSMIT'
                                && (card->sm_ctx.sm_mode == SM_MODE_TRANSMIT)) {
                                                            ^
card-sc-hsm.c:630:14: error: no member named 'sm_ctx' in 'struct sc_card'
                        if (card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) {
                            ~~~~  ^
card-sc-hsm.c:630:32: error: use of undeclared identifier 'SM_MODE_TRANSMIT'
                        if (card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) {
                                                    ^
1 warning and 6 errors generated.
gmake[5]: *** [Makefile:1532: libopensc_la-card-sc-hsm.lo] Error 1
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-11-03 08:39:05 UTC
A commit references this bug:

Author: ale
Date: Fri Nov  3 08:38:19 UTC 2017
New revision: 453391
URL: https://svnweb.freebsd.org/changeset/ports/453391

Log:
  Fix build with disabled SM option.

  PR:		223384
  Submitted by:	Martin Birgmeier <la5lbtyi@aon.at>

Changes:
  head/security/opensc/Makefile
  head/security/opensc/distinfo