I didn't have any luck with the libc.getenv but I have gotten it working using fpgetenv!!!

in SDL.pas around line 261 (I can't recall if this differs from your new version)

[pascal]{$IFDEF UNIX}
{$IFDEF FPC}
{$IFDEF Ver1_0}
linux,
{$ELSE}
pthreads,
baseunix,
{$IFNDEF gp2x}
unix,
{$ELSE}
unix;
{$ENDIF}
{$ENDIF}
{$IFNDEF gp2x}
x,
Xlib;
{$ENDIF}
{$ELSE}
Types,
Libc,
Xlib;
{$ENDIF}
{$ENDIF}[/pascal]

Now the SDL_getenv function:

[pascal]function SDL_getenv(const name: PChar): PChar;
begin
{$IFDEF WIN32}

{$IFDEF __GPC__}
Result := getenv( string( name ) );
{$ELSE}
Result := getenv( name );
{$ENDIF}

{$ELSE}

{$IFDEF UNIX}

{$IFDEF FPC}
Result := fpgetenv(name);
{$ELSE}
Result := libc.getenv(name);
{$ENDIF}

{$ENDIF}

{$ENDIF}
end;[/pascal]

All I had to do was use that, and add the units\arm-linux\rtl folder to my path in my compiler batch file and it now works.
I can get the path environment variable, write it to a file, and look at it using the gp2x E-Book program

WooHoo!!
cheers,
Paul.