Fix build with clang 15

Refresh patches while here
This commit is contained in:
jca 2023-01-24 18:12:41 +00:00
parent 35484b3a02
commit d84f4876bc
10 changed files with 63 additions and 45 deletions

View File

@ -2,7 +2,7 @@ COMMENT= multi-platform CD-Player library
DISTNAME= libworkman-1999-06-20
PKGNAME= libworkman-1.4
REVISION= 1
REVISION= 2
SHARED_LIBS= workman 1.4
CATEGORIES= audio
FIX_EXTRACT_PERMISSIONS=Yes

View File

@ -1,12 +1,13 @@
--- Imakefile.orig Sat May 29 17:48:17 1999
+++ Imakefile Mon Feb 5 07:53:53 2001
@@ -31,7 +31,17 @@ XCOMM
Index: Imakefile
--- Imakefile.orig
+++ Imakefile
@@ -31,8 +31,18 @@ XCOMM
#include "include/wm_version.h"
-WM_LIBVER=WM_LIBVER_MAJOR.WM_LIBVER_MINOR.WM_LIBVER_PL
+WM_LIBVER=WM_LIBVER_MAJOR.WM_LIBVER_MINOR
+
+#define DoNormalLib YES
+#define DoSharedLib YES
+#define DoExtraLib NO
@ -16,10 +17,11 @@
+#define LibName workman
+#define SoRev WM_LIBVER
+#define LibHeaders NO
+
SRCS = cddb.c cdrom.c cdinfo.c plat_freebsd.c plat_sun.c plat_hpux.c \
plat_ultrix.c plat_news.c plat_bsd386.c plat_osf1.c plat_linux.c \
@@ -47,6 +57,7 @@ OBJS = cddb.o cdrom.o cdinfo.o plat_free
plat_aix.c plat_openbsd.c plat_irix.c plat_svr4.c \
@@ -47,6 +57,7 @@ OBJS = cddb.o cdrom.o cdinfo.o plat_freebsd.o plat_sun
HEADERS= \
include/wm_cdda.h \

View File

@ -1,6 +1,15 @@
--- cddb.c.orig Thu May 27 08:37:10 1999
+++ cddb.c Mon Feb 5 08:54:06 2001
@@ -73,10 +73,10 @@ void
Index: cddb.c
--- cddb.c.orig
+++ cddb.c
@@ -33,6 +33,7 @@ static char cddb_id[] = "$Id: cddb.c,v 1.2 1999/02/14
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <sys/types.h>
@@ -73,10 +74,10 @@ void
cddb_cur2struct(void)
{
cddb.protocol = cur_cddb_protocol;
@ -15,7 +24,7 @@
} /* cddb_cur2struct() */
/*
@@ -104,7 +104,7 @@ cddb_sum(int n)
@@ -104,7 +105,7 @@ cddb_sum(int n)
int ret = 0;
/* For backward compatibility this algorithm must not change */
@ -24,7 +33,7 @@
for (p = buf; *p != '\0'; p++)
ret += (*p - '0');
@@ -175,10 +175,10 @@ string_makehello(char *line,char delim)
@@ -175,10 +176,10 @@ string_makehello(char *line,char delim)
{
char mail[84],*host;
@ -37,7 +46,7 @@
delim == ' ' ? "cddb " : "&",
delim == ' ' ? ' ' : '=',
mail,delim,
@@ -226,7 +226,7 @@ connect_open(void)
@@ -226,7 +227,7 @@ connect_open(void)
printf("unknown host: %s\n", host);
return (-1);
}
@ -46,7 +55,7 @@
def.h_name = namebuf;
def.h_addr_list = alist, def.h_addr = (char *)&defaddr;
def.h_length = sizeof (struct in_addr);
@@ -317,14 +317,14 @@ connect_read_entry(void)
@@ -317,14 +318,14 @@ connect_read_entry(void)
t2 = t;
if(*t2 == ' ')
t2++;
@ -63,7 +72,7 @@
}
if('T' == type)
@@ -359,7 +359,7 @@ void
@@ -359,7 +360,7 @@ void
cddbp_read(char *category, unsigned int id)
{
char tempbuf[84];
@ -72,7 +81,7 @@
cddbp_send(tempbuf);
} /* cddbp_read() */
@@ -400,7 +400,7 @@ void
@@ -400,7 +401,7 @@ void
http_read(char *category, unsigned int id)
{
char tempbuf[84];
@ -81,7 +90,7 @@
http_send(tempbuf);
} /* http_read() */
@@ -411,7 +411,7 @@ void
@@ -411,7 +412,7 @@ void
cddb_request(void)
{
int i;
@ -90,7 +99,7 @@
extern int cur_ntracks;
int status;
@@ -447,12 +447,14 @@ cddb_request(void)
@@ -447,12 +448,14 @@ cddb_request(void)
printf("[%s]\n",tempbuf);
printf("query\n");
@ -110,7 +119,7 @@
printf(">%s<\n",tempbuf);
cddbp_send(tempbuf);
connect_getline(tempbuf);
@@ -491,12 +493,14 @@ cddb_request(void)
@@ -491,12 +494,14 @@ cddb_request(void)
printf("USING HTTP%s\n",
(cddb.protocol == 3) ? " WITH PROXY" : "");
printf("query\n");

View File

@ -1,5 +1,6 @@
--- cdinfo.c.orig Thu May 27 08:54:50 1999
+++ cdinfo.c Mon Feb 5 08:24:02 2001
Index: cdinfo.c
--- cdinfo.c.orig
+++ cdinfo.c
@@ -304,32 +304,32 @@ listentry( int num )
{
if (cd->trk[num].section > 9)
@ -39,7 +40,7 @@
cd->trk[num].length / 60,
cd->trk[num].length % 60, name);
}
@@ -544,11 +544,11 @@ stash_cdinfo(char *artist, char *cdname,
@@ -544,11 +544,11 @@ stash_cdinfo(char *artist, char *cdname, int autoplay,
{
if (strcmp(cd->artist, artist))
info_modified = 1;

View File

@ -1,5 +1,6 @@
--- cdrom.c.orig Wed May 5 18:34:19 1999
+++ cdrom.c Mon Feb 5 08:23:21 2001
Index: cdrom.c
--- cdrom.c.orig
+++ cdrom.c
@@ -132,9 +132,9 @@ char *wm_drive_revision( void )
void wm_drive_settype( char *vendor, char *model, char *revision )
@ -13,7 +14,7 @@
}
/*
@@ -154,9 +154,9 @@ find_drive_struct(char *vendor, char *mo
@@ -154,9 +154,9 @@ find_drive_struct(char *vendor, char *model, char *rev
continue;
if (d->proto->vendor[0] == '\0')

View File

@ -1,5 +1,6 @@
--- database.c.orig Fri May 28 05:35:54 1999
+++ database.c Mon Feb 5 08:58:29 2001
Index: database.c
--- database.c.orig
+++ database.c
@@ -121,8 +121,8 @@ nomem:
exit(1);
}
@ -22,7 +23,7 @@
databases[0] = wmdb;
databases[1] = NULL;
}
@@ -214,27 +214,31 @@ print_cdinfo(struct wm_cdinfo *cd, int p
@@ -214,27 +214,31 @@ print_cdinfo(struct wm_cdinfo *cd, int prefs)
{
int i;
char tempbuf[2000]; /* XXX - is this always big enough? */
@ -64,7 +65,7 @@
wm_strmcat(&cdibuf, tempbuf);
}
@@ -257,11 +261,11 @@ print_cdinfo(struct wm_cdinfo *cd, int p
@@ -257,11 +261,11 @@ print_cdinfo(struct wm_cdinfo *cd, int prefs)
{
for (i = 0; l->list[i]; i++)
;
@ -78,7 +79,7 @@
wm_strmcat(&cdibuf, tempbuf);
}
wm_strmcat(&cdibuf, "\n");
@@ -276,24 +280,24 @@ print_cdinfo(struct wm_cdinfo *cd, int p
@@ -276,24 +280,24 @@ print_cdinfo(struct wm_cdinfo *cd, int prefs)
* Have to maintain compatibility with old versions,
* where volume was 0-32.
*/
@ -107,7 +108,7 @@
wm_strmcat(&cdibuf, tempbuf);
}
@@ -304,12 +308,12 @@ print_cdinfo(struct wm_cdinfo *cd, int p
@@ -304,12 +308,12 @@ print_cdinfo(struct wm_cdinfo *cd, int prefs)
{
if (cd->trk[i].avoid)
{

View File

@ -1,6 +1,7 @@
--- index.c.orig Sun Feb 14 10:50:42 1999
+++ index.c Mon Feb 5 08:28:36 2001
@@ -117,7 +117,7 @@ idx_find_entry( char *file, int ntracks,
Index: index.c
--- index.c.orig
+++ index.c
@@ -117,7 +117,7 @@ idx_find_entry( char *file, int ntracks, int *tracks,
/*
* Search for the first matching entry.
*/
@ -9,7 +10,7 @@
key.data = keyval;
key.size = 7;
if (c = (index->seq)(index, &key, &data, R_CURSOR))
@@ -249,7 +249,7 @@ idx_delete_entry(char *file, int track,
@@ -249,7 +249,7 @@ idx_delete_entry(char *file, int track, int fuzz, unsi
/*
* Search for the first matching entry.
*/
@ -18,7 +19,7 @@
key.data = keyval;
key.size = 7;
if (c = (index->seq)(index, &key, &data, R_CURSOR))
@@ -354,7 +354,7 @@ idx_write_entry( char *file, int track,
@@ -354,7 +354,7 @@ idx_write_entry( char *file, int track, unsigned long
key.data = keyval;
key.size = 7;

View File

@ -1,6 +1,7 @@
--- plat_openbsd.c.orig Sun Mar 7 00:36:40 1999
+++ plat_openbsd.c Thu Jun 2 15:15:52 2005
@@ -54,10 +54,12 @@ static char plat_openbsd[] = "$Id: plat_
Index: plat_openbsd.c
--- plat_openbsd.c.orig
+++ plat_openbsd.c
@@ -54,10 +54,12 @@ static char plat_openbsd[] = "$Id: plat_openbsd.c,v 1.
#include <sys/ioctl.h>
#include <sys/cdio.h>
#include <sys/scsiio.h>

View File

@ -1,6 +1,7 @@
--- scsi.c.orig Thu Jun 17 08:48:03 1999
+++ scsi.c Mon Feb 5 08:13:43 2001
@@ -202,9 +202,9 @@ wm_scsi_get_drive_type( struct wm_drive
Index: scsi.c
--- scsi.c.orig
+++ scsi.c
@@ -202,9 +202,9 @@ wm_scsi_get_drive_type( struct wm_drive *d, char *vend
wm_lib_message(WM_MSG_LEVEL_INFO|WM_MSG_CLASS, "Sending SCSI inquiry command...");
if (sendscsi(d, buf, sizeof(buf), 1, SCMD_INQUIRY, 0, 0, 0, sizeof(buf), 0,0,0,0,0,0,0))
{

View File

@ -1,6 +1,7 @@
--- wm_helpers.c.orig Sun Mar 7 09:36:41 1999
+++ wm_helpers.c Mon Feb 5 14:52:48 2001
@@ -30,7 +30,7 @@ static char wm_helpers_id[] = "$Id: wm_h
Index: wm_helpers.c
--- wm_helpers.c.orig
+++ wm_helpers.c
@@ -30,7 +30,7 @@ static char wm_helpers_id[] = "$Id: wm_helpers.c,v 1.7
#include <stdio.h>
#include <string.h>