mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-07 11:20:04 -04:00
36 lines
915 B
Plaintext
36 lines
915 B
Plaintext
$NetBSD: patch-streams_c,v 1.2 2011/11/24 13:34:30 joerg Exp $
|
|
|
|
- patch up LP64 problem
|
|
|
|
--- streams.c.orig 2000-08-16 06:22:06.000000000 +0000
|
|
+++ streams.c
|
|
@@ -13,6 +13,7 @@
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
+#include <inttypes.h>
|
|
|
|
#include "tracks.h"
|
|
#include "streams.h"
|
|
@@ -39,7 +40,7 @@ char *streams_getstreamid(tracks_trackin
|
|
pid=getpid();
|
|
sprintf(streamid,"%#x",pid);
|
|
strcat(streamid,":");
|
|
- sprintf(&streamid[strlen(streamid)],"%#x",(unsigned int)track);
|
|
+ sprintf(&streamid[strlen(streamid)],"%#lx",(uintptr_t)track);
|
|
#ifdef DEBUG
|
|
printf ("calculated stream id: %s\n",streamid);
|
|
#endif
|
|
@@ -80,7 +81,10 @@ tracks_trackinfo *streams_getstreambyid(
|
|
#endif
|
|
if (pid==getpid()) /* if local */
|
|
{
|
|
- sscanf(mempos,"%x",(unsigned int*)&track);
|
|
+ unsigned long tmp;
|
|
+
|
|
+ sscanf(mempos,"%lx", &tmp);
|
|
+ track = (tracks_trackinfo *)tmp;
|
|
}
|
|
else
|
|
{
|