diff options
| author | Hiroki Sato <hrs@FreeBSD.org> | 2013-07-25 10:49:53 +0000 | 
|---|---|---|
| committer | Hiroki Sato <hrs@FreeBSD.org> | 2013-07-25 10:49:53 +0000 | 
| commit | 3326a8cc13b868fabaf0c38a720b1bf69794fbc6 (patch) | |
| tree | c08f9fc2029348d360f35885dabe955a7ec38921 /security/tpm-tools/files/patch-lib-tpm_utils.c | |
| parent | Remove expired ports: (diff) | |
- Fix build on -CURRENT.
- Take maintainership.
Diffstat (limited to 'security/tpm-tools/files/patch-lib-tpm_utils.c')
| -rw-r--r-- | security/tpm-tools/files/patch-lib-tpm_utils.c | 14 | 
1 files changed, 12 insertions, 2 deletions
diff --git a/security/tpm-tools/files/patch-lib-tpm_utils.c b/security/tpm-tools/files/patch-lib-tpm_utils.c index 37ba761c5f74..944a9d7190c6 100644 --- a/security/tpm-tools/files/patch-lib-tpm_utils.c +++ b/security/tpm-tools/files/patch-lib-tpm_utils.c @@ -1,5 +1,5 @@  --- lib/tpm_utils.c.orig	2010-02-02 02:17:23.000000000 +0900 -+++ lib/tpm_utils.c	2010-10-25 01:55:31.065559348 +0900 ++++ lib/tpm_utils.c	2013-07-24 22:00:15.000000000 +0900  @@ -55,6 +55,7 @@   	CmdHelpFunction  tCmdHelp = ( a_tCmdHelpFunction ) ? a_tCmdHelpFunction   							   : logCmdHelp; @@ -8,7 +8,7 @@   	char  szShortOpts[strlen( pszGenShortOpts )   			  + ( ( a_pszShortOpts == NULL ) ? 0 : strlen( a_pszShortOpts ) )   			  + 1]; -@@ -64,6 +65,26 @@ +@@ -64,12 +65,36 @@   	int  iOpt;   	int  rc; @@ -35,3 +35,13 @@   	strcpy( szShortOpts, pszGenShortOpts);   	if ( a_pszShortOpts ) + 		strcat( szShortOpts, a_pszShortOpts ); +  ++#ifdef __GCC + 	memset( sLongOpts, 0, sizeof( sLongOpts ) ); ++#else ++	memset( sLongOpts, 0, (iNumGenLongOpts + a_iNumOpts + 1) * sizeof(struct option)); ++#endif + 	memcpy( sLongOpts, sGenLongOpts, sizeof( sGenLongOpts ) ); + 	if ( a_sLongOpts ) { + 		memcpy( sLongOpts + iNumGenLongOpts,  | 
