aboutsummaryrefslogtreecommitdiff
path: root/emulators/qemu/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu/files')
-rw-r--r--emulators/qemu/files/patch-audio::audio.c12
-rw-r--r--emulators/qemu/files/patch-audio::ossaudio.c11
-rw-r--r--emulators/qemu/files/patch-block.c39
-rw-r--r--emulators/qemu/files/patch-exec.c10
4 files changed, 60 insertions, 12 deletions
diff --git a/emulators/qemu/files/patch-audio::audio.c b/emulators/qemu/files/patch-audio::audio.c
new file mode 100644
index 000000000000..0b50a522e6fd
--- /dev/null
+++ b/emulators/qemu/files/patch-audio::audio.c
@@ -0,0 +1,12 @@
+Index: qemu/audio/audio.c
+@@ -28,6 +28,10 @@
+
+ #include "audio/audio_int.h"
+
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#endif
++
+ #define dolog(...) AUD_log ("audio", __VA_ARGS__)
+ #ifdef DEBUG
+ #define ldebug(...) dolog (__VA_ARGS__)
diff --git a/emulators/qemu/files/patch-audio::ossaudio.c b/emulators/qemu/files/patch-audio::ossaudio.c
new file mode 100644
index 000000000000..8fc9e99b9153
--- /dev/null
+++ b/emulators/qemu/files/patch-audio::ossaudio.c
@@ -0,0 +1,11 @@
+Index: qemu/audio/ossaudio.c
+@@ -21,8 +21,8 @@
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+-#include <sys/mman.h>
+ #include <sys/types.h>
++#include <sys/mman.h>
+ #include <sys/ioctl.h>
+ #include <sys/soundcard.h>
+ #include <assert.h>
diff --git a/emulators/qemu/files/patch-block.c b/emulators/qemu/files/patch-block.c
index d174d8f96e27..c924d2d96039 100644
--- a/emulators/qemu/files/patch-block.c
+++ b/emulators/qemu/files/patch-block.c
@@ -1,5 +1,4 @@
---- qemu/block.c.orig Thu Sep 30 06:27:57 2004
-+++ qemu/block.c Thu Nov 4 23:19:37 2004
+Index: qemu/block.c
@@ -21,6 +21,17 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
@@ -18,6 +17,42 @@
#include "vl.h"
#include "block_int.h"
+@@ -103,14 +103,25 @@
+ {
+ int fd, ret, score, score_max;
+ BlockDriver *drv1, *drv;
+- uint8_t buf[1024];
++ uint8_t *buf;
++ size_t bufsize = 1024;
++ u_int sectorsize = 512;
+
+ fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
+ if (fd < 0)
+ return NULL;
+- ret = read(fd, buf, sizeof(buf));
++#ifdef DIOCGSECTORSIZE
++ if (!ioctl(fd, DIOCGSECTORSIZE, &sectorsize) &&
++ sectorsize > bufsize)
++ bufsize = sectorsize;
++#endif
++ buf = malloc(bufsize);
++ if (!buf)
++ return NULL;
++ ret = read(fd, buf, bufsize);
+ if (ret < 0) {
+ close(fd);
++ free(buf);
+ return NULL;
+ }
+ close(fd);
+@@ -124,6 +135,7 @@
+ drv = drv1;
+ }
+ }
++ free(buf);
+ return drv;
+ }
+
@@ -522,6 +533,15 @@
return -1;
bs->read_only = 1;
diff --git a/emulators/qemu/files/patch-exec.c b/emulators/qemu/files/patch-exec.c
deleted file mode 100644
index f6978d7cc830..000000000000
--- a/emulators/qemu/files/patch-exec.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- qemu/exec.c.orig Mon Oct 11 00:14:19 2004
-+++ qemu/exec.c Thu Oct 28 23:28:25 2004
-@@ -21,6 +21,7 @@
- #ifdef _WIN32
- #include <windows.h>
- #else
-+#include <sys/types.h>
- #include <sys/mman.h>
- #endif
- #include <stdlib.h>