Christian Wiese
11 years ago
1 changed files with 56 additions and 0 deletions
@ -0,0 +1,56 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
# |
||||
# Filename: package/.../musl/pkg/procps/procps.conf |
||||
# Copyright (C) 2014 The OpenSDE Project |
||||
# |
||||
# More information can be found in the files COPYING and README. |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; version 2 of the License. A copy of the |
||||
# GNU General Public License can be found in the file COPYING. |
||||
# --- SDE-COPYRIGHT-NOTE-END --- |
||||
|
||||
# approach taken from sabotage linux |
||||
|
||||
musl_procps_addmissing() { |
||||
# add minimal internal error.h |
||||
cat << EOF > include/error.h |
||||
#include <stdio.h> |
||||
#include <string.h> |
||||
#define PROGRAM_NAME "procps" |
||||
|
||||
#define error(status, errnum, ...) \ |
||||
do { fflush(stdout); \ |
||||
dprintf(2, PROGRAM_NAME ": "); \ |
||||
dprintf(2, __VA_ARGS__); \ |
||||
if(errnum) dprintf(2, ": %s", strerror(errnum)); \ |
||||
dprintf(2, "\n"); \ |
||||
if(status) exit(status); \ |
||||
} while(0) |
||||
|
||||
#define error_at_line(status, errnum, fn, line, ...) \ |
||||
do { fflush(stdout); \ |
||||
dprintf(2, PROGRAM_NAME ": %s:%d", fn, (int) line); \ |
||||
dprintf(2, __VA_ARGS__); \ |
||||
if(errnum) dprintf(2, ": %s", strerror(errnum)); \ |
||||
dprintf(2, "\n"); \ |
||||
if(status) exit(status); \ |
||||
} while(0) |
||||
|
||||
|
||||
EOF |
||||
|
||||
mkdir -p include/sys |
||||
# add minimal sys/dir.h |
||||
cat << EOF > include/sys/dir.h |
||||
#include <dirent.h> |
||||
#define direct dirent |
||||
EOF |
||||
} |
||||
hook_add preconf 5 'musl_procps_addmissing' |
||||
|
||||
# sysctl.c: error: 'GLOB_TILDE' undeclared |
||||
#var_append CFLAGS ' ' '-DGLOB_TILDE=0' |
||||
var_append configprefix ' ' 'CFLAGS="-DGLOB_TILDE=0"' |
Loading…
Reference in new issue