1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #1: configure-getopt-qnx.patch

File configure-getopt-qnx.patch, 2.0 KB (added by stevestereo, 3 years ago)

based on configure-getopt.patch but includes fix for getopt and missing cast in os_qnxnto.cpp

  • configure.in

     
    107107AC_CHECK_TYPES([int64_t, uint64_t]) 
    108108 
    109109dnl Checks for library functions. 
    110 AC_CHECK_FUNCS([getopt_long], , [ 
    111   AC_MSG_NOTICE([smartmontools does no longer support platforms without getopt_long().]) 
    112   AC_MSG_NOTICE([Please inform ${PACKAGE_BUGREPORT},]) 
    113   AC_MSG_NOTICE([including details about your build environment.]) 
    114   AC_MSG_ERROR([function getopt_long() not found]) 
    115 ]) 
     110AC_CHECK_FUNCS([getopt_long], [need_getopt_long=no], [need_getopt_long=yes]) 
     111AM_CONDITIONAL(NEED_GETOPT_LONG, [test "$need_getopt_long" = "yes"]) 
    116112 
    117113AC_CHECK_FUNCS([getdomainname]) 
    118114AC_CHECK_FUNCS([gethostname]) 
  • os_qnxnto.cpp

     
    624624  cpt.cam_timeout=cpt.cam_timeout?cpt.cam_timeout:CAM_TIME_DEFAULT; 
    625625  if(cpt.cam_sense_len) 
    626626   { 
    627     SETIOV(&iov[1],cpt.cam_sense_ptr,cpt.cam_sense_len); 
     627    SETIOV(&iov[1],(void *)cpt.cam_sense_ptr,cpt.cam_sense_len); 
    628628    cpt.cam_sense_ptr=sizeof(cpt); 
    629629    icnt++; 
    630630   } 
  • Makefile.am

     
    2121if ENABLE_ATTRIBUTELOG 
    2222AM_CPPFLAGS += -DSMARTMONTOOLS_ATTRIBUTELOG='"$(attributelog)"' 
    2323endif 
     24if NEED_GETOPT_LONG 
     25AM_CPPFLAGS += -I$(srcdir)/getopt -DHAVE_GETOPT_LONG -D__GNU_LIBRARY__ 
     26endif 
    2427 
    2528sbin_PROGRAMS = smartd  \ 
    2629                smartctl 
     
    161164 
    162165endif 
    163166 
     167if NEED_GETOPT_LONG 
     168 
     169smartctl_SOURCES += \ 
     170        getopt/getopt.c \ 
     171        getopt/getopt.h \ 
     172        getopt/getopt1.c 
     173 
     174smartd_SOURCES += \ 
     175        getopt/getopt.c \ 
     176        getopt/getopt.h \ 
     177        getopt/getopt1.c 
     178 
     179endif 
     180 
    164181if OS_SOLARIS 
    165182# This block is required because Solaris uses manual page section 1m 
    166183# for administrative command (linux/freebsd use section 8) and Solaris