From 6edb752085c018f1fd43dc029cdc3e28255a1fe2 Mon Sep 17 00:00:00 2001 From: hyc Date: Sun, 14 Mar 2010 05:31:36 +0000 Subject: [PATCH] Use HOMEPATH on Windows, not HOME git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@352 400ebc74-4327-4243-bc38-086b20814532 --- librtmp/hashswf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c index 8acba2d..60f006b 100644 --- a/librtmp/hashswf.c +++ b/librtmp/hashswf.c @@ -396,6 +396,12 @@ strtime(time_t * t, char *s) #define HEX2BIN(a) (((a)&0x40)?((a)&0xf)+9:((a)&0xf)) +#ifdef WIN32 +#define ENV_HOME "HOMEPATH" +#else +#define ENV_HOME "HOME" +#endif + int RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, int age) @@ -413,7 +419,7 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, HMAC_CTX ctx; date[0] = '\0'; - home = getenv("HOME"); + home = getenv(ENV_HOME); if (!home) home = "."; -- 2.40.0