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.

106 lines
2.5 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fgetty/x-de-diet-fication.patch
# Copyright (C) 2004 - 2006 The T2 SDE 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 ---
Fixed fgetty to build witout dietlibc.
- Rene Rebe <rene@exactcode.de>
--- ./fgetty.c.vanilla 2005-02-27 11:30:39.580133784 +0100
+++ ./fgetty.c 2005-02-27 11:31:37.798283280 +0100
@@ -10,6 +10,7 @@
#include <sys/ioctl.h>
#include <errno.h>
#include <termios.h>
+#include <time.h>
#include "fmt.h"
--- ./login.c.vanilla 2005-02-27 11:33:30.557141328 +0100
+++ ./login.c 2005-02-27 11:33:41.628458232 +0100
@@ -36,6 +36,8 @@
#include <fcntl.h>
#include <signal.h>
+extern char **environ;
+
void die(const char *message) {
write(2,message,strlen(message));
write(2,"\n",1);
--- ./ltostr.c.vanilla 2005-02-27 11:37:07.164212048 +0100
+++ ./ltostr.c 2005-02-27 11:37:38.768407480 +0100
@@ -0,0 +1,36 @@
+#include <string.h>
+#include <stdlib.h>
+
+#ifndef __dietlibc__
+
+int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase)
+{
+ char *tmp;
+ unsigned int j=0;
+
+ s[--size]=0;
+
+ tmp=s+size;
+
+ if ((base==0)||(base>36)) base=10;
+
+ j=0;
+ if (!i)
+ {
+ *(--tmp)='0';
+ j=1;
+ }
+
+ while((tmp>s)&&(i))
+ {
+ tmp--;
+ if ((*tmp=i%base+'0')>'9') *tmp+=(UpCase?'A':'a')-'9'-1;
+ i=i/base;
+ j++;
+ }
+ memmove(s,tmp,j+1);
+
+ return j;
+}
+
+#endif
--- ./Makefile.vanilla 2005-02-27 11:32:44.925078456 +0100
+++ ./Makefile 2005-02-27 11:42:09.696220192 +0100
@@ -9,7 +9,7 @@
STRIP=strip
#CROSS=arm-linux-
CROSS=
-LDFLAGS=-s
+LDFLAGS=-s -lcrypt
%.o: %.c
# gcc -march=i386 -mcpu=i386 -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
@@ -18,11 +18,11 @@
$(CROSS)$(STRIP) -x -R .comment -R .note $@
%: %.o
- $(DIET) $(CROSS)$(CC) -nostdlib -o $@ $^ $(LDFLAGS)
+ $(DIET) $(CROSS)$(CC) -o $@ $^ $(LDFLAGS)
fgetty: fgetty.o fmt_ulong.o
-login: login.o
+login: login.o ltostr.o
login2: login2.o
checkpassword: checkpassword.o