*** ./jpegoptim.c.ORIG	Thu Mar 21 09:26:11 2013
--- ./jpegoptim.c	Thu Mar 21 09:27:29 2013
***************
*** 315,320 ****
--- 315,326 ----
    }
  }
  
+ #if defined(_AIX51) && !defined(_AIX52)
+ double round(double x){
+   return (x >= 0) ? floor(x+0.5) : ceil(x-0.5);
+   }
+ #endif
+ 
  /*****************************************************************/
  int main(int argc, char **argv) 
  {
*** ./Makefile.in.ORIG	Thu Apr  2 22:52:44 2015
--- ./Makefile.in	Thu Apr  2 22:53:06 2015
***************
*** 36,42 ****
  XCPPFLAGS = @CPPFLAGS@
  CFLAGS    = @CFLAGS@ $(XCPPFLAGS) $(DEFS)
  #CFLAGS	 += -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 
! LDFLAGS   = @LDFLAGS@
  LIBS      = @LIBS@
  STRIP     = strip
  
--- 36,42 ----
  XCPPFLAGS = @CPPFLAGS@
  CFLAGS    = @CFLAGS@ $(XCPPFLAGS) $(DEFS)
  #CFLAGS	 += -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 
! LDFLAGS   = @LDFLAGS@ -lm
  LIBS      = @LIBS@
  STRIP     = strip
  
