You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

104 lines
3.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../musl/pkg/xen-tools/musl_support.patch
# Copyright (C) 2015 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
This patch comes from AlpineLinux
http://git.alpinelinux.org/cgit/aports/plain/main/xen/musl-support.patch
--- xen-4.3.1.orig/m4/ptyfuncs.m4
+++ xen-4.3.1/m4/ptyfuncs.m4
@@ -22,7 +22,6 @@
#endif
int main(void) {
openpty(0,0,0,0,0);
- login_tty(0);
}
])],[
break
--- xen-4.3.1.orig/tools/libxl/libxl_bootloader.c
+++ xen-4.3.1/tools/libxl/libxl_bootloader.c
@@ -85,6 +85,21 @@
/*----- synchronous subroutines -----*/
+static int setup_console_tty(int fd)
+{
+ (void) setsid();
+#ifdef TIOCSCTTY
+ if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
+ return (-1);
+#endif
+ (void) dup2(fd, 0);
+ (void) dup2(fd, 1);
+ (void) dup2(fd, 2);
+ if (fd > 2)
+ (void) close(fd);
+ return (0);
+}
+
static int setup_xenconsoled_pty(libxl__egc *egc, libxl__bootloader_state *bl,
char *slave_path, size_t slave_path_len)
{
@@ -548,7 +563,7 @@
if (!pid) {
/* child */
- r = login_tty(libxl__carefd_fd(bl->ptys[0].slave));
+ r = setup_console_tty(libxl__carefd_fd(bl->ptys[0].slave));
if (r) { LOGE(ERROR, "login_tty failed"); exit(-1); }
libxl__exec(gc, -1, -1, -1, bl->args[0], (char **) bl->args, env);
exit(-1);
--- xen-4.3.1.orig/tools/firmware/hvmloader/acpi/acpi2_0.h
+++ xen-4.3.1/tools/firmware/hvmloader/acpi/acpi2_0.h
@@ -366,7 +366,7 @@
/*
* Table Signatures.
*/
-#define ACPI_2_0_RSDP_SIGNATURE ASCII64('R','S','D',' ','P','T','R',' ')
+#define ACPI_2_0_RSDP_SIGNATURE 0x2052545020445352LL /* "RSD PTR " */
#define ACPI_2_0_FACS_SIGNATURE ASCII32('F','A','C','S')
#define ACPI_2_0_FADT_SIGNATURE ASCII32('F','A','C','P')
#define ACPI_2_0_MADT_SIGNATURE ASCII32('A','P','I','C')
--- xen-4.3.1.orig/tools/blktap2/vhd/lib/libvhd-journal.c
+++ xen-4.3.1/tools/blktap2/vhd/lib/libvhd-journal.c
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#include <sys/stat.h>
#include "atomicio.h"
#include "libvhd-journal.h"
--- xen-4.3.1.orig/tools/blktap2/include/atomicio.h
+++ xen-4.3.1/tools/blktap2/include/atomicio.h
@@ -25,6 +25,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
+
/*
* Ensure all of data on socket comes through. f==read || f==vwrite
*/
--- xen-4.3.1.orig/tools/blktap2/drivers/block-remus.c
+++ xen-4.3.1/tools/blktap2/drivers/block-remus.c
@@ -54,7 +54,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/param.h>
-#include <sys/sysctl.h>
#include <unistd.h>
#include <sys/stat.h>