! ! Allow the latest Capi4BSD from http://www.nord-com.net/thomas.wintergerst/ ! to compile on amd64 as well as modern FreeBSD versions without suser() ! or I4B support. ! diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/avmaic/avmaic.c c4b-1.1.1/kernel/c4b/avmaic/avmaic.c --- c4b-1.1.1.orig/kernel/c4b/avmaic/avmaic.c 2006-02-28 21:35:07.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/avmaic/avmaic.c 2010-07-22 14:12:27.000000000 +0000 @@ -418,8 +418,11 @@ static int avmaic_detach * @retval Else An errno value representing the error occurred * during the shutdown operation. */ -static void avmaic_shutdown - (device_t dev); +#if defined (__FreeBSD_version) && __FreeBSD_version >= 800000 +static int avmaic_shutdown (device_t dev); +#else +static void avmaic_shutdown (device_t dev); +#endif @@ -1189,8 +1192,13 @@ static int avmaic_detach * during the shutdown operation. */ +#if defined (__FreeBSD_version) && __FreeBSD_version >= 800000 +static int avmaic_shutdown + (device_t dev) +#else static void avmaic_shutdown (device_t dev) +#endif { AvmAicSc_t *pSc; AvmAicPortData_t *pPort; @@ -1221,6 +1229,10 @@ static void avmaic_shutdown pSc->state = AVMAIC_STATE_DOWN; avmmisc_release_ctlr_access (pSc, s); +#if defined (__FreeBSD_version) && __FreeBSD_version >= 800000 + return (0); +#endif + } /* avmaic_shutdown */ diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/avmaic/avmarm.c c4b-1.1.1/kernel/c4b/avmaic/avmarm.c --- c4b-1.1.1.orig/kernel/c4b/avmaic/avmarm.c 2006-02-28 21:35:08.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/avmaic/avmarm.c 2010-07-22 12:49:25.000000000 +0000 @@ -522,6 +522,9 @@ int avmarm_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmarm_intr, pSc, &(pSc->resInfo.hIrqCookie)); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/avmaic/avmb1.c c4b-1.1.1/kernel/c4b/avmaic/avmb1.c --- c4b-1.1.1.orig/kernel/c4b/avmaic/avmb1.c 2006-02-28 21:35:08.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/avmaic/avmb1.c 2010-07-22 12:49:25.000000000 +0000 @@ -438,6 +438,9 @@ int avmb1_isa_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmb1_io_intr, pSc, &(pSc->resInfo.hIrqCookie)); @@ -627,6 +630,9 @@ int avmb1_pci_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmdma_intr, pSc, &(pSc->resInfo.hIrqCookie)); @@ -652,6 +658,9 @@ int avmb1_pci_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmb1_io_intr, pSc, &(pSc->resInfo.hIrqCookie)); @@ -902,6 +911,9 @@ int avmb1_pccard_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmb1_io_intr, pSc, &(pSc->resInfo.hIrqCookie)); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/avmaic/avmt1.c c4b-1.1.1/kernel/c4b/avmaic/avmt1.c --- c4b-1.1.1.orig/kernel/c4b/avmaic/avmt1.c 2006-02-28 21:35:10.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/avmaic/avmt1.c 2010-07-22 12:49:25.000000000 +0000 @@ -482,6 +482,9 @@ int avmt1_isa_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmt1_isa_intr, pSc, &(pSc->resInfo.hIrqCookie)); @@ -626,6 +629,9 @@ int avmt1_pci_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) avmdma_intr, pSc, &(pSc->resInfo.hIrqCookie)); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/capidev/capidev.c c4b-1.1.1/kernel/c4b/capidev/capidev.c --- c4b-1.1.1.orig/kernel/c4b/capidev/capidev.c 2006-02-28 21:35:11.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/capidev/capidev.c 2010-07-22 14:09:29.000000000 +0000 @@ -73,6 +73,10 @@ __FBSDID("$FreeBSD$"); #include +#if defined (__FreeBSD_version) && __FreeBSD_version >= 800000 +#define FILE_LOCK(fp) do { } while(0) +#define FILE_UNLOCK(fp) do { } while(0) +#endif @@ -573,13 +577,13 @@ static struct cdevsw g_capi_cdevsw = /** The structure of CAPI related descriptor functions. */ static struct fileops g_capiFdOps = { - capidev_read, /* fo_read */ - capidev_write, /* fo_write */ - capidev_ioctl, /* fo_ioctl */ - capidev_poll, /* fo_poll */ - capidev_kqfilter, /* fo_kqfilter */ - capidev_stat, /* fo_stat */ - capidev_close /* fo_close */ + .fo_read = capidev_read, /* fo_read */ + .fo_write = capidev_write, /* fo_write */ + .fo_ioctl = capidev_ioctl, /* fo_ioctl */ + .fo_poll = capidev_poll, /* fo_poll */ + .fo_kqfilter = capidev_kqfilter, /* fo_kqfilter */ + .fo_stat = capidev_stat, /* fo_stat */ + .fo_close = capidev_close /* fo_close */ #if defined (__FreeBSD_version) && __FreeBSD_version >= 501000 , 0 /* fo_flags */ @@ -837,12 +841,20 @@ static int capidev_open /* now we can assign the new functions and data to the allocated descriptor */ +#if __FreeBSD_version < 700036 FILEDESC_LOCK (pThread->td_proc->p_fd); +#else + FILEDESC_XLOCK (pThread->td_proc->p_fd); +#endif fp->f_data = (caddr_t) pAppInfo; fp->f_flag = FREAD | FWRITE; fp->f_ops = &g_capiFdOps; fp->f_type = DTYPE_CAPI; +#if __FreeBSD_version < 700036 FILEDESC_UNLOCK (pThread->td_proc->p_fd); +#else + FILEDESC_XUNLOCK (pThread->td_proc->p_fd); +#endif /* falloc() holds an extra reference (sys/kern/kern_descrip.c rev. 1.215 */ fdrop (fp, pThread); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/daic/daic.c c4b-1.1.1/kernel/c4b/daic/daic.c --- c4b-1.1.1.orig/kernel/c4b/daic/daic.c 2006-02-28 21:35:11.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/daic/daic.c 2010-07-22 12:49:25.000000000 +0000 @@ -691,6 +691,9 @@ static int daic_attach /* register interrupt routine */ (void) bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) daichw_intr, pSc, &(pSc->resInfo.hIrqCookie)); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/daic/daic_plci.c c4b-1.1.1/kernel/c4b/daic/daic_plci.c --- c4b-1.1.1.orig/kernel/c4b/daic/daic_plci.c 2006-02-28 21:35:15.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/daic/daic_plci.c 2010-07-22 12:49:25.000000000 +0000 @@ -4436,6 +4436,7 @@ static unsigned daicplci_handle_connect_ p [i++] = 0x85; } #endif /* 1 */ + bSAdd = 0; /* quieten compiler */ daicplci_get_sin_sadd_from_cip ((unsigned) C_GET_WORD (pCapiReq->info.connect_req.wCip), &bSin, &bSAdd); diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_bpci.c c4b-1.1.1/kernel/c4b/ix1a/ix1a_bpci.c --- c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_bpci.c 2006-02-28 21:35:21.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/ix1a/ix1a_bpci.c 2010-07-22 12:49:25.000000000 +0000 @@ -347,6 +347,9 @@ int ix1abpci_init_board { iRes = bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) ix1abpci_interrupt_handler, pSc, &(pSc->resInfo.hIrqCookie)); if (iRes != 0) diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_isa.c c4b-1.1.1/kernel/c4b/ix1a/ix1a_isa.c --- c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_isa.c 2006-02-28 21:35:21.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/ix1a/ix1a_isa.c 2010-07-22 12:49:25.000000000 +0000 @@ -598,6 +598,9 @@ int ix1aisa_init_board iFlags |= INTR_EXCL; } iRes = bus_setup_intr (dev, pSc->resInfo.pResIrq, iFlags, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) ix1aisa_interrupt_handler, pSc, &(pSc->resInfo.hIrqCookie)); if (iRes != 0) diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_ppci.c c4b-1.1.1/kernel/c4b/ix1a/ix1a_ppci.c --- c4b-1.1.1.orig/kernel/c4b/ix1a/ix1a_ppci.c 2006-02-28 21:35:22.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/ix1a/ix1a_ppci.c 2010-07-22 12:49:25.000000000 +0000 @@ -972,6 +972,9 @@ int ix1appci_init_board { iRes = bus_setup_intr (dev, pSc->resInfo.pResIrq, INTR_TYPE_NET | INTR_MPSAFE, +#if __FreeBSD_version >= 700031 + NULL, +#endif (driver_intr_t *) ix1appci_interrupt_handler, pSc, &(pSc->resInfo.hIrqCookie)); if (iRes != 0) diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_appl.c c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_appl.c --- c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_appl.c 2006-02-28 21:35:25.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_appl.c 2010-10-16 13:27:42.000000000 +0000 @@ -51,6 +51,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#endif #include #include /* for net/if.h */ #include /* struct ifqueue */ @@ -358,6 +361,9 @@ typedef struct * The internal mutex of this queue is also not * initialized or used. */ +#if defined(__alpha__) || defined (__ia64__) || defined (__amd64__) || defined (__sparc64__) +#define CAPI_64BIT +#endif #if defined (CAPI_64BIT) void (*pfnCallback) (unsigned uApplID, u_int64_t dwParam); /**< @@ -2978,7 +2984,7 @@ static unsigned kcapiappl_handle_start_a CAPITraceConf_t *pTrcConf; unsigned long ulTraceMask; unsigned long ulDataBlockLength; - int fIsRoot; + int fIsPriv; int afMayTraceAppl [CAPI_MAX_APPLICATIONS]; int i; unsigned uTracerID; @@ -3025,14 +3031,18 @@ static unsigned kcapiappl_handle_start_a sx_xlock (&g_sxAppData); - fIsRoot = (suser (curthread) == 0); +#if __FreeBSD_version >= 800089 + fIsPriv = (priv_check (curthread, PRIV_C4B_TRACE) == 0); +#else + fIsPriv = (suser (curthread) == 0); +#endif for (i = 0; (size_t) i < ARRAY_COUNT (g_aAppInfo); ++i) { if (! g_aAppInfo [i].fAppRegistered) { continue; } - if (fIsRoot || + if (fIsPriv || (curthread->td_ucred && (curthread->td_ucred->cr_uid == g_aAppInfo [i].effUserID || groupmember (g_aAppInfo [i].effGroupID, curthread->td_ucred) != 0))) diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_ctlr.c c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_ctlr.c --- c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_ctlr.c 2006-02-28 21:35:26.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_ctlr.c 2010-10-16 13:27:53.000000000 +0000 @@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#endif #include #include #include @@ -845,7 +848,11 @@ unsigned kcapi_reset_ctlr /* check if operation is allowed by owner of the current process / thread */ if (! curthread || curthread->td_ucred == NOCRED || curthread->td_ucred == FSCRED || +#if __FreeBSD_version >= 800089 + priv_check (curthread, PRIV_C4B_RESET_CTLR) != 0) +#else suser (curthread) != 0) +#endif { mtx_unlock (&g_mtxCtlrData); DBG (LOG_ERROR, "ERROR: Root permission required to reset controller %u", @@ -1607,7 +1614,12 @@ void kcapictlr_init (void) /* start the work thread to handle incoming message from the controllers */ g_fDoWorkLoop = 1; pNewProc = NULL; + +#if __FreeBSD_version < 800002 iRes = kthread_create (kcapictlr_message_handler, NULL, &pNewProc, +#else + iRes = kproc_create (kcapictlr_message_handler, NULL, &pNewProc, +#endif 0, 0, "kcapimgr-message-handler"); if (iRes == 0) { @@ -2389,7 +2401,11 @@ static void kcapictlr_message_handler mtx_lock (&Giant); #endif /* ! __FreeBSD_version || __FreeBSD_version < 503001 */ +#if __FreeBSD_version < 800002 kthread_exit (0); +#else + kproc_exit (0); +#endif /* suppress warning for unused parameters */ (void) pUnused; diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_trace.c c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_trace.c --- c4b-1.1.1.orig/kernel/c4b/kcapimgr/kcapi_trace.c 2006-02-28 21:35:26.000000000 +0000 +++ c4b-1.1.1/kernel/c4b/kcapimgr/kcapi_trace.c 2010-10-16 13:28:02.000000000 +0000 @@ -48,6 +48,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#endif #include #include #include @@ -333,7 +336,11 @@ unsigned kcapitrace_add_tracer if (curthread->td_ucred != NULL) { /* check if the current privileges declare a root user */ +#if __FreeBSD_version >= 800089 + if (priv_check (curthread, PRIV_C4B_TRACE) == 0) +#else if (suser (curthread) == 0) +#endif { pEntry->fIsRoot = 1; } diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcapimgr.c c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcapimgr.c --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcapimgr.c 2006-03-11 18:55:17.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcapimgr.c 2010-07-22 12:49:25.000000000 +0000 @@ -59,8 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include /* CAPIMAN_VERSION_* */ -#include -#include +#include +#include /* import includes */ #include @@ -944,8 +944,13 @@ static void StartWorkThread (void) */ sema_init (&g_semThreadTerm, 0, "i4bcapimgr-thread-terminate"); +#if __FreeBSD_version < 800002 iRes = kthread_create (I4bCapiWorkThread, NULL, &pNewProc, 0, 0, "i4bcapimgr"); +#else + iRes = kproc_create (I4bCapiWorkThread, NULL, &pNewProc, + 0, 0, "i4bcapimgr"); +#endif if (iRes == 0) { DBG (LOG_TRACE, "Kernel thread started"); @@ -1069,9 +1074,15 @@ static void I4bCapiWorkThread sema_post (&g_semThreadTerm); /* this is needed with current until kthread_exit() itself grabs it */ +#if ! defined (__FreeBSD_version) || __FreeBSD_version < 503001 /* accroding to kcapi_ctlr.c */ mtx_lock (&Giant); +#endif /* ! __FreeBSD_version || __FreeBSD_version < 503001 */ +#if __FreeBSD_version < 800002 kthread_exit (0); +#else + kproc_exit (0); +#endif /* suppress warning for unused parameters */ (void) pUnused; diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_capiutil.c c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_capiutil.c --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_capiutil.c 2006-02-28 21:35:28.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_capiutil.c 2010-07-22 12:49:25.000000000 +0000 @@ -47,7 +47,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#else #include +#endif /* import includes */ diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_l4if.c c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_l4if.c --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_l4if.c 2006-02-28 21:35:28.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_l4if.c 2010-07-22 12:49:25.000000000 +0000 @@ -53,8 +53,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#include +#else #include #include +#endif /* import includes */ #include diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_nccism.c c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_nccism.c --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_nccism.c 2006-02-28 21:35:28.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_nccism.c 2010-07-22 12:49:25.000000000 +0000 @@ -52,8 +52,13 @@ __FBSDID("$FreeBSD$"); #include /* struct ifqueue */ #include #include +#if __FreeBSD_version >= 700052 +#include +#include +#else #include #include +#endif /* import includes */ #include diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_plcism.c c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_plcism.c --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_plcism.c 2006-02-28 21:35:29.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_plcism.c 2010-07-22 12:49:25.000000000 +0000 @@ -53,8 +53,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700052 +#include +#include +#else #include #include +#endif /* import includes */ #include diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_var.h c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_var.h --- c4b-1.1.1.orig/kernel/i4b/i4bcapimgr/i4bcmgr_var.h 2006-02-28 21:35:30.000000000 +0000 +++ c4b-1.1.1/kernel/i4b/i4bcapimgr/i4bcmgr_var.h 2010-07-22 12:49:25.000000000 +0000 @@ -44,7 +44,11 @@ #include #include #include +#if __FreeBSD_version >= 700052 +#include +#else #include +#endif #include #include diff -x '*.orig' -uprN c4b-1.1.1.orig/kernel/modules/Makefile c4b-1.1.1/kernel/modules/Makefile --- c4b-1.1.1.orig/kernel/modules/Makefile 2006-02-28 21:35:30.000000000 +0000 +++ c4b-1.1.1/kernel/modules/Makefile 2010-10-16 13:20:33.000000000 +0000 @@ -6,8 +6,12 @@ SUBDIR = kcapimgr capidev avmaic daic ix1a -.if ${MACHINE_ARCH} == "i386" +OSVERSION!= sysctl -n kern.osreldate + +.if ${OSVERSION} < 800038 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" SUBDIR += i4bcapimgr .endif +.endif .include diff -x '*.orig' -uprN c4b-1.1.1.orig/tools/capitest/capiutil.cc c4b-1.1.1/tools/capitest/capiutil.cc --- c4b-1.1.1.orig/tools/capitest/capiutil.cc 2006-02-28 21:35:39.000000000 +0000 +++ c4b-1.1.1/tools/capitest/capiutil.cc 2010-07-22 12:49:25.000000000 +0000 @@ -429,7 +429,7 @@ unsigned char *CapiUt_EnterCalledPartyNu } /* the first byte is the type of number and numbering plan */ - *(pDst++) = 0x80; + *(pDst++) = (char)0x80; nLen++; /* copy the number string */ @@ -471,7 +471,7 @@ unsigned char *CapiUt_EnterCallingPartyN * the presentation and screening indicator */ *(pDst++) = 0x0; - *(pDst++) = 0x80; + *(pDst++) = (char)0x80; nLen += 2; /* copy the number string */ diff -x '*.orig' -uprN c4b-1.1.1.orig/tools/capitrace/Makefile c4b-1.1.1/tools/capitrace/Makefile --- c4b-1.1.1.orig/tools/capitrace/Makefile 2006-02-28 21:35:41.000000000 +0000 +++ c4b-1.1.1/tools/capitrace/Makefile 2010-07-22 14:13:40.000000000 +0000 @@ -17,6 +17,6 @@ MAN= capitrace.8 CFLAGS+= -D_REENTRANT -D_THREAD_SAFE -pthread -I$S DPADD+= ${LIBC_R} ${LIBCAPI20} ${LIBSTDCPLUSPLUS} -LDADD+= -lc_r -lcapi20 -lstdc++ +LDADD+= -lpthread -lcapi20 -lstdc++ .include