The logic in this patch was taken from the following patch:

From 757649a766f90e745f24df1d191caeef15c71399 Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Tue, 4 Jun 2013 09:28:51 -0300
Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i

Vivante libGL does not provide the glWindowPos2iARB symbol, but
glWindowPos2i. Use this instead.

Upstream-Status: Inapropriate [embedded specific]

Reported-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
--- mesa-demos-8.3.0/src/xdemos/wincopy.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/xdemos/wincopy.c	2017-04-05 18:09:13.263180482 -0400
@@ -156,11 +156,11 @@ Redraw(void)
    glClear(GL_COLOR_BUFFER_BIT);
 
    if (TestClipping) {
-      glWindowPos2iARB(-2, -2);
+      glWindowPos2i(-2, -2);
       glCopyPixels(-2, -2, Width[0] + 4, Height[0] + 4, GL_COLOR);
    }
    else {
-      glWindowPos2iARB(0, 0);
+      glWindowPos2i(0, 0);
       glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);
    }
 
--- mesa-demos-8.3.0/src/xdemos/glxsnoop.c.orig	2017-04-05 17:57:40.155293379 -0400
+++ mesa-demos-8.3.0/src/xdemos/glxsnoop.c	2017-04-05 18:09:13.265180482 -0400
@@ -92,7 +92,7 @@ redraw(Display *dpy, Window srcWin, Wind
    }
 
    glXMakeCurrent(dpy, dstWin, Context);
-   glWindowPos2iARB(0, 0);
+   glWindowPos2i(0, 0);
    glDrawBuffer(GL_FRONT);
    glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, image);
    glFlush();
--- mesa-demos-8.3.0/src/glsl/shadow_sampler.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/glsl/shadow_sampler.c	2017-04-05 18:09:13.267180481 -0400
@@ -85,7 +85,7 @@ Redisplay(void)
    glPopMatrix();
 
    glUseProgram(0);
-   glWindowPos2iARB(80, 20);
+   glWindowPos2i(80, 20);
    PrintString("white   black   white   black");
 
    {
--- mesa-demos-8.3.0/src/trivial/tri-fbo.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/trivial/tri-fbo.c	2017-04-05 18:09:13.268180481 -0400
@@ -119,7 +119,7 @@ static void Draw( void )
       glClearColor(0.8, 0.8, 0, 0.0);
       glClear(GL_COLOR_BUFFER_BIT);
 
-      glWindowPos2iARB(30, 30);
+      glWindowPos2i(30, 30);
       glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
       
       
--- mesa-demos-8.3.0/src/trivial/readpixels.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/trivial/readpixels.c	2017-04-05 18:09:13.270180481 -0400
@@ -71,7 +71,7 @@ static void Draw(void)
    printf("Pixel(0,0) = %f, %f, %f, %f\n",
           image[0], image[1], image[2], image[3]);
    /* draw to right half of window */
-   glWindowPos2iARB(Width, 0);
+   glWindowPos2i(Width, 0);
    glPixelZoom(Zoom, Zoom);
    glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image);
    free(image);
--- mesa-demos-8.3.0/src/trivial/clear-fbo-scissor.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/trivial/clear-fbo-scissor.c	2017-04-05 18:09:13.271180481 -0400
@@ -182,7 +182,7 @@ Draw(void)
 
       /* draw to window */
       glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-      glWindowPos2iARB(0, 0);
+      glWindowPos2i(0, 0);
       glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
       free(buffer);
--- mesa-demos-8.3.0/src/trivial/clear-fbo-tex.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/trivial/clear-fbo-tex.c	2017-04-05 18:09:13.273180480 -0400
@@ -140,7 +140,7 @@ static void Draw( void )
       glClearColor(0.8, 0.8, 0, 0.0);
       glClear(GL_COLOR_BUFFER_BIT);
 
-      glWindowPos2iARB(30, 30);
+      glWindowPos2i(30, 30);
       glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
       
       free(buffer);
--- mesa-demos-8.3.0/src/trivial/clear-fbo.c.orig	2013-01-22 15:42:38.000000000 -0500
+++ mesa-demos-8.3.0/src/trivial/clear-fbo.c	2017-04-05 18:09:13.274180480 -0400
@@ -116,7 +116,7 @@ Draw(void)
       glClearColor(0.8, 0.8, 0, 0.0);
       glClear(GL_COLOR_BUFFER_BIT);
 
-      glWindowPos2iARB(30, 30);
+      glWindowPos2i(30, 30);
       glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
       
       free(buffer);
--- mesa-demos-8.3.0/src/demos/fogcoord.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/demos/fogcoord.c	2017-04-05 18:09:13.275180480 -0400
@@ -68,14 +68,14 @@ PrintInfo(void)
 
    sprintf(s, "Mode(m): %s  Start(s/S): %g  End(e/E): %g  Density(d/D): %g",
            ModeStr, fogStart, fogEnd, fogDensity);
-   glWindowPos2iARB(5, 20);
+   glWindowPos2i(5, 20);
    PrintString(s);
 
    sprintf(s, "Arrays(a): %s  glFogCoord(c): %s  EyeZ(z/z): %g",
            (Arrays ? "Yes" : "No"),
            (fogCoord ? "Yes" : "No"),
            camz);
-   glWindowPos2iARB(5, 5);
+   glWindowPos2i(5, 5);
    PrintString(s);
 }
 
--- mesa-demos-8.3.0/src/demos/engine.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/demos/engine.c	2017-04-05 18:09:13.278180480 -0400
@@ -971,7 +971,7 @@ Draw(void)
       glDisable(GL_LIGHTING);
       glDisable(GL_TEXTURE_2D);
       glColor3f(1, 1 , 1);
-      glWindowPos2iARB(10, 10);
+      glWindowPos2i(10, 10);
       PrintString(s);
       if (lit)
 	 glEnable(GL_LIGHTING);
--- mesa-demos-8.3.0/src/demos/copypix.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/demos/copypix.c	2017-04-05 18:09:13.280180479 -0400
@@ -54,7 +54,7 @@ static void Display( void )
    glClear( GL_COLOR_BUFFER_BIT );
 
    /* draw original image */
-   glWindowPos2iARB(dx, dy);                    
+   glWindowPos2i(dx, dy);                    
    glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
 
    if (Scissor)
@@ -71,7 +71,7 @@ static void Display( void )
 
    /* draw copy */
    glPixelZoom(Xzoom, Yzoom);
-   glWindowPos2iARB(Xpos, Ypos);
+   glWindowPos2i(Xpos, Ypos);
    glCopyPixels(dx, dy, ImgWidth, ImgHeight, GL_COLOR);
    glPixelZoom(1, 1);
 
--- mesa-demos-8.3.0/src/tests/drawbuffers2.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/drawbuffers2.c	2017-04-05 18:09:13.281180479 -0400
@@ -112,7 +112,7 @@ Display(void)
    glUseProgram(0);
    glDisable(GL_DEPTH_TEST);
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-   glWindowPos2iARB(0, 0);
+   glWindowPos2i(0, 0);
    glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
    free(buffer);
--- mesa-demos-8.3.0/src/tests/fbotest3.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/fbotest3.c	2017-04-05 18:09:13.283180479 -0400
@@ -79,7 +79,7 @@ Display( void )
    /* draw to window */
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    glDisable(GL_DEPTH_TEST);  /* in case window has depth buffer */
-   glWindowPos2iARB(0, 0);
+   glWindowPos2i(0, 0);
    glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
    free(buffer);
--- mesa-demos-8.3.0/src/tests/fbotest1.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/fbotest1.c	2017-04-05 18:09:13.284180479 -0400
@@ -61,7 +61,7 @@ Display( void )
 
    /* draw to window */
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-   glWindowPos2iARB(0, 0);
+   glWindowPos2i(0, 0);
    glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
    free(buffer);
--- mesa-demos-8.3.0/src/tests/fbotest2.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/fbotest2.c	2017-04-05 18:09:13.285180479 -0400
@@ -72,7 +72,7 @@ Display( void )
 
       glDisable(GL_DEPTH_TEST);  /* in case window has depth buffer */
 
-      glWindowPos2iARB(0, 0);
+      glWindowPos2i(0, 0);
       glCopyPixels(0, 0, Width, Height, GL_COLOR);
    }
    else if (blitPix) {
@@ -95,7 +95,7 @@ Display( void )
       /* draw to window */
       glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
       glDisable(GL_DEPTH_TEST);  /* in case window has depth buffer */
-      glWindowPos2iARB(0, 0);
+      glWindowPos2i(0, 0);
       glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
       free(buffer);
--- mesa-demos-8.3.0/src/tests/auxbuffer.c.orig	2012-09-19 05:36:31.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/auxbuffer.c	2017-04-05 18:09:13.287180478 -0400
@@ -419,7 +419,7 @@ event_loop(Display *dpy, Window win)
       /* Copy aux buffer image to back color buffer */
       glReadBuffer(GL_AUX0);
       glDrawBuffer(GL_BACK);
-      glWindowPos2iARB(0, 0);
+      glWindowPos2i(0, 0);
       glDisable(GL_DEPTH_TEST);
       glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR);
       glEnable(GL_DEPTH_TEST);
--- mesa-demos-8.3.0/src/tests/readrate.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/readrate.c	2017-04-05 18:09:13.289180478 -0400
@@ -85,7 +85,7 @@ MeasureFormat(struct format_type *fmt, G
       glEnd();
 
 #if DRAW
-      glWindowPos2iARB(0,0);
+      glWindowPos2i(0,0);
       glDrawPixels(width, height,
                    fmt->Format, fmt->Type, Buffer);
       glFinish();
@@ -137,21 +137,21 @@ Draw(void)
 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
-   glWindowPos2iARB(10, y);
+   glWindowPos2i(10, y);
    sprintf(str, "ReadPixels size: %d x %d", width, height);
    PrintString(str);
    y -= 14;
 
-   glWindowPos2iARB(10, y);
+   glWindowPos2i(10, y);
    PrintString("Press up/down/left/right to change image size.");
    y -= 14;
 
-   glWindowPos2iARB(10, y);
+   glWindowPos2i(10, y);
    PrintString("Press 'b' to run benchmark test.");
    y -= 14;
 
    if (Benchmark) {
-      glWindowPos2iARB(10, y);
+      glWindowPos2i(10, y);
       PrintString("Testing...");
    }
 
--- mesa-demos-8.3.0/src/tests/drawbuffers.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/drawbuffers.c	2017-04-05 18:09:13.290180478 -0400
@@ -88,7 +88,7 @@ Display(void)
    glUseProgram(0);
    glDisable(GL_DEPTH_TEST);
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-   glWindowPos2iARB(0, 0);
+   glWindowPos2i(0, 0);
    glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
 
    free(buffer);
--- mesa-demos-8.3.0/src/tests/copypixrate.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/copypixrate.c	2017-04-05 18:09:13.292180478 -0400
@@ -91,7 +91,7 @@ BlitOne(void)
    else
 #endif
    {
-      glWindowPos2iARB(x, y);
+      glWindowPos2i(x, y);
       glCopyPixels(0, 0, ImgWidth, ImgHeight, GL_COLOR);
    }
 }
--- mesa-demos-8.3.0/src/tests/viewmemory.c.orig	2012-06-25 11:34:58.000000000 -0400
+++ mesa-demos-8.3.0/src/tests/viewmemory.c	2017-04-05 18:09:13.293180477 -0400
@@ -95,7 +95,7 @@ Draw(void)
 
    glDisable(GL_TEXTURE_2D);
    glColor3f(0, 1, 0);
-   glWindowPos2iARB(10, 10);
+   glWindowPos2i(10, 10);
    PrintString(s);
 
    glutSwapBuffers();
