diff options
author | grant <grant> | 2004-06-26 18:00:21 +0000 |
---|---|---|
committer | grant <grant> | 2004-06-26 18:00:21 +0000 |
commit | 3f791c201fd46c9dc6d931f3dcdfac029f31210a (patch) | |
tree | 64104ffbb2be211109e6f7b02bdc57f634bb8d4b /multimedia/libmpeg3/patches/patch-ae | |
parent | e9da91b9d7180e407ee1838ab1ce1e6d880f8b81 (diff) | |
download | pkgsrc-3f791c201fd46c9dc6d931f3dcdfac029f31210a.tar.gz |
move libmpeg3 to multimedia/
Diffstat (limited to 'multimedia/libmpeg3/patches/patch-ae')
-rw-r--r-- | multimedia/libmpeg3/patches/patch-ae | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/multimedia/libmpeg3/patches/patch-ae b/multimedia/libmpeg3/patches/patch-ae new file mode 100644 index 00000000000..945eb272c37 --- /dev/null +++ b/multimedia/libmpeg3/patches/patch-ae @@ -0,0 +1,55 @@ +$NetBSD: patch-ae,v 1.1 2004/06/26 18:00:21 grant Exp $ + +--- mpeg3io.c.orig 2001-05-20 13:05:26.000000000 +1000 ++++ mpeg3io.c 2004-05-04 23:48:36.000000000 +1000 +@@ -1,11 +1,17 @@ + #include "mpeg3private.h" + #include "mpeg3protos.h" + +-#include <mntent.h> +-#include <sys/stat.h> ++#include <sys/param.h> ++#include <sys/mount.h> + #include <stdlib.h> + #include <string.h> + ++#ifdef __NetBSD__ ++# if __NetBSD_Version__ >= 200040000 /* 2.0D */ ++# define statfs statvfs ++# endif ++#endif ++ + mpeg3_fs_t* mpeg3_new_fs(char *path) + { + mpeg3_fs_t *fs = calloc(1, sizeof(mpeg3_fs_t)); +@@ -88,27 +94,15 @@ + + int mpeg3io_device(char *path, char *device) + { +- struct stat file_st, device_st; +- struct mntent *mnt; +- FILE *fp; ++ struct statfs file_st; + +- if(stat(path, &file_st) < 0) ++ if(statfs(path, &file_st) < 0) + { + perror("mpeg3io_device"); + return 1; + } + +- fp = setmntent(MOUNTED, "r"); +- while(fp && (mnt = getmntent(fp))) +- { +- if(stat(mnt->mnt_fsname, &device_st) < 0) continue; +- if(device_st.st_rdev == file_st.st_dev) +- { +- strncpy(device, mnt->mnt_fsname, MPEG3_STRLEN); +- break; +- } +- } +- endmntent(fp); ++ strncpy(device, file_st.f_mntfromname, MPEG3_STRLEN); + + return 0; + } |